X
Tap here to go to the mobile version of the site.
Your Firefox is out of date and may contain a security risk! Upgrade Firefox

Support Forum

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

Posted

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

Additional System Details

Installed Plug-ins

  • Shockwave Flash 11.2 r202
  • nspluginwrapper is a cross-platform NPAPI plugin viewer, in particular for linux/i386 plugins.This beta software is available under the terms of the GNU General Public License.
  • Gecko Media Player 1.0.7Video Player Plug-in for QuickTime, RealPlayer and Windows Media Player streams using MPlayer
  • The Totem 3.4.3 plugin handles video and audio streams.
  • DivX Web Player version 1.4.0.233
  • This plug-in detects the presence of iTunes when opening iTunes Store URLs in a web page with Firefox.
  • MozPlugger version 1.14.3, maintained by Louis Bavoil and Peter Leese, a fork of plugger written by Fredrik Hübinette.For documentation on how to configure mozplugger, check the man page. (type man mozplugger) Configuration file:/etc/mozpluggerrc Helper binary:mozplugger-helper Controller binary:mozplugger-controller Link launcher binary:mozplugger-linker
  • Helix DNA Plugin: RealPlayer G2 Plug-In Compatible version 0.4.0.4434 built with gcc 3.4.6 on Oct 1 2008

Application

  • User Agent: Mozilla/5.0 (X11; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0

More Information

Application Basics
Name
Firefox
Version
19.0.2
User Agent
Mozilla/5.0 (X11; Linux i686; rv:19.0) Gecko/20100101 Firefox/19.0
Build Configuration
about:buildconfig
Extensions
Name
Version
Enabled
ID
Adblock Plus
2.2.3
true
{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}
Beef Taco (Targeted Advertising Cookie Opt-Out)
1.3.7
true
john@velvetcache.org
BetterPrivacy
1.68
true
{d40f5e7b-d2cf-4856-b441-cc613eeffbe3}
BugMeNot
2.2
true
{987311C6-B504-4aa2-90BF-60CC49808D42}
CheckPlaces
2.6.2
true
checkplaces@andyhalford.com
Flashblock
1.5.15.1
true
{3d7eb24f-2740-49df-8937-200b1cc08f8a}
Forecastfox
2.2.3
true
{0538E3E3-7E9B-4d49-8831-A227C80A7AD3}
Ghostery
2.9.2
true
firefox@ghostery.com
Google Analytics Opt-out Browser Add-on
0.9.6
true
{6d96bb5e-1175-4ebf-8ab5-5f56f1c79f65}
Greasemonkey
1.8
true
{e4a8a97b-f2ed-450b-b12d-ee082ba24781}
Password Exporter
1.2.1
true
{B17C1C5A-04B1-11DB-9804-B622A1EF5492}
Rotor Throbber
1.7.0
true
admin@foxed.ca
Springpad Extension
2.6.1212.17
true
ext@sprng.me
Tab Mix Plus
0.4.0.5pre.130223a
true
{dc572301-7619-498c-a57d-39143191b318}
Tweak Network
1.5.5
true
{DAD0F81A-CF67-4eed-98D6-26F6E47274CA}
User Agent Switcher
0.7.3
true
{e968fc70-8f95-4ab9-9e79-304de2a71ee1}
Novell Moonlight
2.4.1
false
moonlight@novell.com
Slashdotter
2.2.3
false
{c4f1fdfb-49f5-4cb5-a4e5-3b857ca2ef95}
Important Modified Preferences
Name
Value
accessibility.typeaheadfind
true
accessibility.typeaheadfind.flashBar
0
browser.cache.disk.capacity
1048576
browser.cache.disk.smart_size_cached_value
419840
browser.cache.disk.smart_size.first_run
false
browser.link.open_newwindow
1
browser.places.smartBookmarksVersion
4
browser.search.context.loadInBackground
true
browser.search.openintab
true
browser.search.useDBForOrder
true
browser.sessionstore.resume_from_crash
false
browser.startup.homepage_override.buildID
20130311161838
browser.startup.homepage_override.mstone
19.0.2
browser.tabs.loadBookmarksInBackground
true
browser.tabs.loadDivertedInBackground
true
browser.tabs.onTop
false
dom.max_script_run_time
0
extensions.lastAppVersion
19.0.2
network.cookie.prefsMigrated
true
network.http.max-connections
40
network.http.max-connections-per-server
16
network.http.max-persistent-connections-per-proxy
16
network.http.max-persistent-connections-per-server
16
network.http.pipelining
true
network.http.pipelining.maxrequests
8
network.http.proxy.pipelining
true
network.manage-offline-status
false
places.database.lastMaintenance
1363424625
places.history.expiration.transient_current_max_pages
52877
places.history.expiration.transient_optimal_database_size
42032332
plugin.disable_full_page_plugin_for_types
application/pdf
print.tmp.printerfeatures.Canon_MX410_series.can_change_colorspace
false
print.tmp.printerfeatures.Canon_MX410_series.can_change_downloadfonts
false
print.tmp.printerfeatures.Canon_MX410_series.can_change_jobtitle
false
print.tmp.printerfeatures.Canon_MX410_series.can_change_num_copies
true
print.tmp.printerfeatures.Canon_MX410_series.can_change_orientation
true
print.tmp.printerfeatures.Canon_MX410_series.can_change_paper_size
true
print.tmp.printerfeatures.Canon_MX410_series.can_change_plex
false
print.tmp.printerfeatures.Canon_MX410_series.can_change_printincolor
true
print.tmp.printerfeatures.Canon_MX410_series.can_change_resolution
false
print.tmp.printerfeatures.Canon_MX410_series.can_change_spoolercommand
false
print.tmp.printerfeatures.Canon_MX410_series.colorspace.0.name
default
print.tmp.printerfeatures.Canon_MX410_series.colorspace.count
1
print.tmp.printerfeatures.Canon_MX410_series.has_special_printerfeatures
true
print.tmp.printerfeatures.Canon_MX410_series.orientation.0.name
portrait
print.tmp.printerfeatures.Canon_MX410_series.orientation.1.name
landscape
print.tmp.printerfeatures.Canon_MX410_series.orientation.count
2
print.tmp.printerfeatures.Canon_MX410_series.paper.0.height_mm
210
print.tmp.printerfeatures.Canon_MX410_series.paper.0.is_inch
false
print.tmp.printerfeatures.Canon_MX410_series.paper.0.name
A5
print.tmp.printerfeatures.Canon_MX410_series.paper.0.width_mm
148
print.tmp.printerfeatures.Canon_MX410_series.paper.1.height_mm
297
print.tmp.printerfeatures.Canon_MX410_series.paper.1.is_inch
false
print.tmp.printerfeatures.Canon_MX410_series.paper.1.name
A4
print.tmp.printerfeatures.Canon_MX410_series.paper.1.width_mm
210
print.tmp.printerfeatures.Canon_MX410_series.paper.2.height_mm
420
print.tmp.printerfeatures.Canon_MX410_series.paper.2.is_inch
false
print.tmp.printerfeatures.Canon_MX410_series.paper.2.name
A3
print.tmp.printerfeatures.Canon_MX410_series.paper.2.width_mm
297
print.tmp.printerfeatures.Canon_MX410_series.paper.3.height_mm
279
print.tmp.printerfeatures.Canon_MX410_series.paper.3.is_inch
true
print.tmp.printerfeatures.Canon_MX410_series.paper.3.name
Letter
print.tmp.printerfeatures.Canon_MX410_series.paper.3.width_mm
215
print.tmp.printerfeatures.Canon_MX410_series.paper.4.height_mm
355
print.tmp.printerfeatures.Canon_MX410_series.paper.4.is_inch
true
print.tmp.printerfeatures.Canon_MX410_series.paper.4.name
Legal
print.tmp.printerfeatures.Canon_MX410_series.paper.4.width_mm
215
print.tmp.printerfeatures.Canon_MX410_series.paper.5.height_mm
431
print.tmp.printerfeatures.Canon_MX410_series.paper.5.is_inch
true
print.tmp.printerfeatures.Canon_MX410_series.paper.5.name
Tabloid
print.tmp.printerfeatures.Canon_MX410_series.paper.5.width_mm
279
print.tmp.printerfeatures.Canon_MX410_series.paper.6.height_mm
254
print.tmp.printerfeatures.Canon_MX410_series.paper.6.is_inch
true
print.tmp.printerfeatures.Canon_MX410_series.paper.6.name
Executive
print.tmp.printerfeatures.Canon_MX410_series.paper.6.width_mm
190
print.tmp.printerfeatures.Canon_MX410_series.paper.count
7
print.tmp.printerfeatures.Canon_MX410_series.plex.0.name
default
print.tmp.printerfeatures.Canon_MX410_series.plex.count
1
print.tmp.printerfeatures.Canon_MX410_series.resolution.0.name
default
print.tmp.printerfeatures.Canon_MX410_series.resolution.count
1
print.tmp.printerfeatures.Canon_MX410_series.supports_colorspace_change
false
print.tmp.printerfeatures.Canon_MX410_series.supports_downloadfonts_change
false
print.tmp.printerfeatures.Canon_MX410_series.supports_jobtitle_change
false
print.tmp.printerfeatures.Canon_MX410_series.supports_orientation_change
true
print.tmp.printerfeatures.Canon_MX410_series.supports_paper_size_change
true
print.tmp.printerfeatures.Canon_MX410_series.supports_plex_change
false
print.tmp.printerfeatures.Canon_MX410_series.supports_printincolor_change
true
print.tmp.printerfeatures.Canon_MX410_series.supports_resolution_change
false
print.tmp.printerfeatures.Canon_MX410_series.supports_spoolercommand_change
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_colorspace
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_downloadfonts
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_jobtitle
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_num_copies
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_orientation
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_paper_size
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_plex
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_printincolor
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_resolution
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.can_change_spoolercommand
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.colorspace.0.name
default
print.tmp.printerfeatures.CUPS/Canon_MX410_series.colorspace.count
1
print.tmp.printerfeatures.CUPS/Canon_MX410_series.has_special_printerfeatures
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.orientation.0.name
portrait
print.tmp.printerfeatures.CUPS/Canon_MX410_series.orientation.1.name
landscape
print.tmp.printerfeatures.CUPS/Canon_MX410_series.orientation.count
2
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.0.height_mm
210
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.0.is_inch
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.0.name
A5
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.0.width_mm
148
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.1.height_mm
297
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.1.is_inch
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.1.name
A4
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.1.width_mm
210
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.2.height_mm
420
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.2.is_inch
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.2.name
A3
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.2.width_mm
297
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.3.height_mm
279
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.3.is_inch
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.3.name
Letter
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.3.width_mm
215
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.4.height_mm
355
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.4.is_inch
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.4.name
Legal
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.4.width_mm
215
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.5.height_mm
431
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.5.is_inch
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.5.name
Tabloid
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.5.width_mm
279
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.6.height_mm
254
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.6.is_inch
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.6.name
Executive
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.6.width_mm
190
print.tmp.printerfeatures.CUPS/Canon_MX410_series.paper.count
7
print.tmp.printerfeatures.CUPS/Canon_MX410_series.plex.0.name
default
print.tmp.printerfeatures.CUPS/Canon_MX410_series.plex.count
1
print.tmp.printerfeatures.CUPS/Canon_MX410_series.resolution.0.name
default
print.tmp.printerfeatures.CUPS/Canon_MX410_series.resolution.count
1
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_colorspace_change
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_downloadfonts_change
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_jobtitle_change
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_orientation_change
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_paper_size_change
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_plex_change
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_printincolor_change
true
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_resolution_change
false
print.tmp.printerfeatures.CUPS/Canon_MX410_series.supports_spoolercommand_change
false
privacy.clearOnShutdown.cookies
false
privacy.clearOnShutdown.formdata
false
privacy.clearOnShutdown.history
false
privacy.clearOnShutdown.sessions
false
privacy.donottrackheader.enabled
true
privacy.popups.showBrowserMessage
false
privacy.sanitize.migrateFx3Prefs
true
privacy.sanitize.sanitizeOnShutdown
true
security.warn_viewing_mixed
false
Graphics
Adapter Description
VMware, Inc. -- Gallium 0.4 on llvmpipe (LLVM 0x300)
Device ID
Gallium 0.4 on llvmpipe (LLVM 0x300)
Driver Version
2.1 Mesa 8.0.4
GPU Accelerated Windows
0/1 Basic Blocked for your graphics driver version.
Vendor ID
VMware, Inc.
WebGL Renderer
Blocked for your graphics driver version.
AzureCanvasBackend
cairo
AzureContentBackend
none
AzureFallbackCanvasBackend
none
JavaScript
Incremental GC
true
Accessibility
Activated
false
Prevent Accessibility
0
Library Versions
Expected minimum version
Version in use
NSPR
4.9.5
4.9.5
NSS
3.14.2.0
3.14.3.0 Extended ECC
NSSSMIME
3.14.2.0
3.14.3.0 Extended ECC
NSSSSL
3.14.2.0
3.14.3.0 Extended ECC
NSSUTIL
3.14.2.0
3.14.3.0

jscher2000
  • Top 10 Contributor
2357 solutions 20872 answers

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.

Question owner

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.