How can I tell Chrome or Firefox to launch Javascript or load bookmarks from the command line?

Can I tell Chrome or Firefox from the command line that javascript is starting in the browser window that opens? Or, alternatively, download a bookmarklet containing javascript?

I would like to have a program that monitors changes in the css file, and when the css file is updated, the browser window will automatically download the new css file. I installed the javascript bookmarklet to do this, but I would like it to be executed automatically whenever the css file is updated.

+3
source share
2 answers

Firefox , Chrome. URL- javascript: , . nsICommandLineHandler (. https://developer.mozilla.org/en/Chrome/Command_Line ) . nsIWindowWatcher.getMostRecentWindow("navigator:browser") window.gBrowser.contentWindow.location.href = "javascript:..." .

+2

All Articles