Questions tagged [bookmarklet]

A bookmarklet is a browser bookmark for a URL using the 'javascript:' protocol. The 'javascript:' prefix is followed by a snippet of JavaScript code. When invoked, instead of navigating to a new page, the script is executed within the context of the current page.

A bookmarklet is a browser bookmark for a URL using the javascript: protocol. The javascript: prefix is followed by a snippet of JavaScript code. When invoked, instead of navigating to a new page, the script is executed within the context of the current page.

1355 questions
6
votes
3 answers

how to deal with quotes in bookmarklets

this is a script i found for writing jQuery bookmarklets and i've added three lines of code to it. the problem is jQuery code has lots of quotes (for selectors) and as i have to put the bookmarklets in a href="javascript:code" everything gets messed…
Pouria P
  • 565
  • 1
  • 8
  • 21
6
votes
2 answers

Open multiple tabs in Chrome via bookmarklet

I'm making bookmarklets for my personal use, and some of them should open 2-3 tabs at once. But currently Chrome dissalows to open multilple tabs with one click, blocking the second, third and the rest of window.opens which I'm trying to execute. I…
Nakilon
  • 34,866
  • 14
  • 107
  • 142
6
votes
2 answers

How to detach event in IE 6 7 8 9 using JavaScript

This is a partial code, not the full version. I have a highlighter that highlights a specific html element when the mouse hovers. I also have a click event and listener. My problem is : the highlighter event/listener does not detach when using…
Ionut Flavius Pogacian
  • 4,750
  • 14
  • 58
  • 100
5
votes
3 answers

Javascript bookmarklet fails on certain sites, creates ghostly new page

I noticed that my Javascript bookmarklet was failing on certain sites like Google Reader and Google search results pages (and randomly on some non-Google sites). Looking at the console, I could see that, for these pages, clicking the bookmarklet did…
glortho
  • 13,120
  • 8
  • 49
  • 45
5
votes
2 answers

How can I modify the tumblr bookmarklet to post to a specific tumblr blog?

I have a couple blogs linked to my Tumblr account, but the bookmarklet always selects my "primary" blog (the first one in the list). How can I modify the bookmarklet so that it will auto-select a specific blog? I would like to have multiple…
k107
  • 15,882
  • 11
  • 61
  • 59
5
votes
5 answers

Is there a way to have browsers ignore or override xml-stylesheet processing instructions?

I'm trying to write a bookmarklet to help some QA testers submit useful debugging information when they come across issues. Currently I can set window.location to a URL that provides this debugging information, but this resource is an XML document…
Steven Huwig
  • 20,015
  • 9
  • 55
  • 79
5
votes
4 answers

Javascript bookmarklet/iFrame to auto-refresh loaded page if no activity detected within set timeframe?

I have a browser-based application that I use at work (as effectively all corporate apps are now browser-based for obvious reasons) that has an annoyingly short session timeout. I'm not sure precisely what the session timeout is set to, but it's…
Sootah
  • 1,771
  • 3
  • 23
  • 42
5
votes
3 answers

How to encode a URL as a CakePHP parameter

I would like to create a bookmarklet for adding bookmarks. So you just click on the Bookmark this Page JavaScript Snippet in your Bookmarks and you are redirected to the page. This is my current bookmarklet: "javascript:…
Martin Ueding
  • 8,245
  • 6
  • 46
  • 92
5
votes
1 answer

How to do authentication in bookmarklet?

I would like my bookmarklet to require the user to login. Here is the idea....I create an iframe for user to login, and show the a/c information. But I would like to get some information from server, for example, I would like to know whether the…
DNB5brims
  • 29,344
  • 50
  • 131
  • 195
5
votes
4 answers

Is it possible to load multiple different version of jQuery on the same page?

I'm making a bookmarklet which will load jQuery if the object is not found. The loading will check on the version of jQuery. The code is like: (function(){ var myBkl = { loadScript: function(src) { if(window.jQuery &&…
jackysee
  • 2,051
  • 4
  • 32
  • 38
5
votes
1 answer

document.execCommand(‘cut’/‘copy’) was denied in bookmarklet

I am working on a bookmarklet that makes an href link of the current browser tab and copies it to the clipboard. This bookmarklet works in…
BlueDogRanch
  • 721
  • 1
  • 16
  • 43
5
votes
3 answers

Javascript Bookmarklet to get current URL

How would I get the current URL with a javascript code that could be used in a bookmarklet? This code isn't working: javascript:copy(window.location.href); It needs to copy it to the clipboard. I need to support Firefox, Chrome and IE
Will Evans
  • 227
  • 2
  • 10
  • 20
5
votes
3 answers

Chrome Bookmarklet which open in new tab with specific action

I want to make a Chrome Bookmarklet which open a new tab with specific action. To be more exact I want to have a fixed URL like "https://www.blablabla.com/search=" inside the bookmarklet and when I press it, I want a popup window to appear with an…
DoSMaN
  • 59
  • 1
  • 4
5
votes
3 answers

Bookmarklet Help: Creating a Find/Replace Bookmarklet

I'm trying to slightly modify this so that it prompts for the text to search for, followed by the text to replace with, and when all done processing, show a dialog box letting me know it's done. I plan to use it on a phpmyadmin database edit page…
J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
5
votes
3 answers

How to "Decompile" a Bookmarklet?

We all know that bookmarklets are nothing but some executable javascript code that do some things for us when we click on them depending on the function that they are intended to do... My Question is: For example, I have a Bookmarklet, don't know,…
Jmlevick
  • 51
  • 2