Questions tagged [bookmarklet]

A bookmarklet is a piece of JavaScript code stored within a bookmark, which is executed by following the bookmark.

A bookmarklet is a piece of JavaScript code stored within a bookmark, which is executed by following the bookmark. It is understood by the browser as a URI with the special protocol javascript:, which instructs the browser to execute the rest of the URI.

Bookmarklets are typically used for cross-browser compatibility - where very few browsers have compatible extension types (and even a very select few have no extension capability), most implement JavaScript to some degree of compatibility with the ECMAScript standard.

Generally speaking, bookmarklets come at the cost of integration from the user's standpoint, because bookmarklets are generally unable to:

  • Be run upon page load (Greasemonkey fits this niche, but a few browsers lack the ability to run it)
  • Modify the browser's interface (which browser extensions generally can do)

Some sites deal in distributing bookmarklets, including:

58 questions
32
votes
5 answers

How to disable CSP in Firefox for just bookmarklets?

Today I have noticed that I am unable to run bookmarklets on https://github.com/ due to Content Security Policy (CSP) restrictions. Is there a way to disable CSP in Firefox for just bookmarklets, and not everything else? I noticed the…
Lekensteyn
  • 6,982
30
votes
4 answers

Add a bookmarklet in Google Chrome

I am currently running Chrome 11. I have been trying to figure out how to add a bookmarklet (which should be dead simple) and it's driving me crazy. This is the site I'm trying to drag the bookmarklet from http://gridder.andreehansson.se/ First…
Scott
  • 1,683
21
votes
5 answers

How can I add a Firefox bookmark as toolbar button?

I have a bookmark that I use to 'zap colours' from…
falter
  • 2,097
18
votes
11 answers

Google Chrome plugin/bookmarklet: "open in Firefox"?

Is there a plugin or a bookmarklet for Chrome which opens the current page in Firefox? Update: Thanks Phoshi for the suggestion. Here is my AutoHotKey script (not messing with the clipboard...): #IfWinActive ahk_class Chrome_WindowImpl_0 ^+f::…
fluxtendu
  • 7,219
18
votes
7 answers

How can I add a favicon to a bookmarklet in Firefox?

Bookmarklets, such as SuperGenPass don't have favicons, because they are javascript: links and Firefox doesn't know where it would obtain the favicon from. Is there any way to add a favicon to a JavaScript bookmarklet?
17
votes
3 answers

How can I add a favicon to a bookmarklet in Google Chrome?

I'm on OS X and I want my bookmarklets to have favicons. I already found two articles but they didn't help much: http://www.tapper-ware.net/blog/?p=97#comment-2076 It's a great article but as I understand it this doesn't seem to work for Chrome…
patrick
  • 1,020
11
votes
2 answers

Turn JavaScript into bookmark or bookmarklet?

I have created one script that shows passwords on hover just like Windows 8 on eye click. I have made this functionality through JavaScript with following code. function text(){this.type="text"}function password(){this.type="password"}function…
vishal
  • 121
9
votes
6 answers

Creating Hotkeys in Firefox for bookmarks (bookmarklets)

I would like to set up shortcuts (hotkeys) for several Firefox bookmarks (they're actually bookmarklets). One example is the pinboard.in bookmarklet. Does anyone know how to do this?
jdigital
  • 911
9
votes
1 answer

How do I setup keyboard shortcuts to bookmarklets in Firefox?

I'm using the wonderful bookmarklet Readability by Arc90, and it's been useful to the point where I almost always load it on pages I intend to read. I'm using Firefox 3.5 and/or 3.6 (it depends on if I'm at home or at work), and so far I've been…
samy
  • 335
8
votes
1 answer

How to create dynamic bookmark in Firefox?

Is it possible, or how to do it - to have bookmark (bookmarklet?) that, when clicking would open new page, that would have 2 parameters calculated based on current date? For example, today it would…
user7385
7
votes
2 answers

Why doesn't SuperGenPass work on some sites when I use Chrome?

Bookmarklet SuperGenPass sometime fails to popup when I click the bookmark in Chrome. It does however work when on the same page in Firefox; an example is http://www.engadget.com/login This behaviour also replicated on a new Chrome tab…
7
votes
1 answer

Modify URL using Javascript bookmarklet

Very new to Javascript but this seems to be a relatively easy task... I want to modify a URL using a Javascript bookmarklet for Chrome, etc. Here's what I need to change it from to: Original URL: http://www.example.com/article/url-slug-here New URL:…
jmt
  • 71
5
votes
4 answers

What are the most useful bookmarklets for a superuser who do not have extension support?

After the release of Google Chrome I changed my default browser from Firefox to Chrome. I was a fan of Firefox but Chrome was what I've been waiting for because of its speed and some other features. I was using a lot of extensions in Firefox, but…
spinodal
  • 1,649
5
votes
1 answer

Bookmarklet: run JS command after page is loaded

I build quite a lot of bookmarklets to automate my every day's work. Now I faced a problem: I would like (by clicking on a bookmarklet) to open a page in web browser (I use Internet Explorer 8) and apply some specific operation on its interface.…
4
votes
1 answer

How do I restore the URL after running a bookmarklet with a keyword?

I like to use bookmarklets in Firefox, and my preferred way to run them is to type the bookmark keyword into the URL bar and hit Enter. This works, but Firefox replaces the URL with the code for the bookmarklet. How do I automatically restore the…
user106046
1
2 3 4