Mozilla will shut down Pocket’s services on July 8, 2025. At that time users will no longer be able to access the Pocket website, apps and API. You can export your saved items and API data until October 8, 2025 before they are permanently removed. For more information, see this article.

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I use a file on my computer as a bookmarklet?

  • 2 replies
  • 2 have this problem
  • 36 views
  • Last reply by sideburns

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?

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 👍 1

All 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.