cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
Regular User

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?

1 ACCEPTED SOLUTION

Accepted Solutions
SUMO Contributor

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

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.

2 REPLIES
SUMO Contributor

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

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.

Regular User

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

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.