
How can I use a file on my computer as a bookmarklet?
I'm using Firefox 19.0.2 on Fedora 17. I've copied a javascript function onto my computer (and marked it as executable) and put it on my Smart Bookmark list as a bookmarklet. Alas, when I try to use it, all it does is open the file, displaying the contents in the browser window. How do I get it to work as it's supposed to?
Chosen solution
I don't think Firefox will read and interpret a local .js file as a script. That would be somewhat hazardous... However, you can copy the script to the clipboard and paste it as the Location of your bookmark. This thread has an example of what I mean: https://support.mozilla.org/en-US/que.../951958#answer-412647.
Read this answer in context 👍 1All Replies (2)
Chosen Solution
I don't think Firefox will read and interpret a local .js file as a script. That would be somewhat hazardous... However, you can copy the script to the clipboard and paste it as the Location of your bookmark. This thread has an example of what I mean: https://support.mozilla.org/en-US/que.../951958#answer-412647.
It took a bit of work to get Firefox to stop putting http:// at the front, because the script started with java_script instead of javascript, but I got it to run. Thanx.