fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.29k stars 117 forks source link

ENHANCEMENT: Support Greasemonkey and Tampermonkey #64

Closed 23maverick23 closed 8 years ago

23maverick23 commented 8 years ago

Overview: Allow GhostText to open up SublimeText to edit scripts in Greasemonkey or Tampermonkey extensions.

Usage: Instead of writing scripts in a console window or a basic editor, scripts can be written in ST which allows for better syntax highlighting, better autocomplete, better linting preferences and ultimately better user experience.

Details: Greasemonkey in Firefox uses the MDN Scratchpad feature, which isn't available to GhostText. Tampermonkey in Chrome opens in an extension-specific URL page with a code editor (which throws an error in the background.html page)

extensions::uncaught_exception_handler:8 Error in response to tabs.executeScript: TypeError: Cannot read property '0' of undefined
    at Object.callback (chrome-extension://godiecgffnchndlihlpaajjcplehddca/scripts/lib.js:65:29)
    at Object.GhostText.loadContentJs (chrome-extension://godiecgffnchndlihlpaajjcplehddca/scripts/lib.js:62:21)
    at toggleConnection (chrome-extension://godiecgffnchndlihlpaajjcplehddca/scripts/lib.js:91:27)
    at Object.callback (chrome-extension://godiecgffnchndlihlpaajjcplehddca/scripts/lib.js:35:13)handler @ extensions::uncaught_exception_handler:8

extensions::lastError:133 Unchecked runtime.lastError while running tabs.executeScript: Cannot access a chrome-extension:// URL of different extension
    at Object.GhostText.loadContentJs (chrome-extension://godiecgffnchndlihlpaajjcplehddca/scripts/lib.js:62:21)
    at toggleConnection (chrome-extension://godiecgffnchndlihlpaajjcplehddca/scripts/lib.js:91:27)
    at Object.callback (chrome-extension://godiecgffnchndlihlpaajjcplehddca/scripts/lib.js:35:13)
fregante commented 8 years ago

Thank you for your issue, but we can't