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
2 answers

SCRIPT5009: "$" is undefined in IE9

I have a bookmarklet that loads a div into a current page and places an iframe inside it. The bookmarklet works like a dream in all browsers except IE9. Even works in earlier versions of IE. I'm using the following bookmarklet…
HGPB
  • 4,346
  • 8
  • 50
  • 86
6
votes
1 answer

Bookmarklet In New Window

So I've got a bookmarklet which should open up a page in a new…
Me1000
  • 1,760
  • 1
  • 12
  • 14
6
votes
2 answers

How to convert a bookmarklet into a Greasemonkey userscript?

Is there a easy way to do this. And is there anything that needs to be changed due to differences in how it is ran?
6
votes
2 answers

Is is possible to make ajax calls from a bookmarklet?

I plan to create a bookmarklet which users will use to share content (bacially url's and page title) around the web on say mysite.com. So this is what I am following till now: Bookmarklet calls an external.js which basically contains all the…
Adi
  • 187
  • 1
  • 14
6
votes
2 answers

Add border to images

I'm totally new to JS. I'm trying to make me a bookmarklet that finds all images on a web page and adds a colorful border to them. Then, by clicking on an image I'd like to attach the image path. This is what I've got so far: javascript: for (var i=…
Michael
  • 327
  • 2
  • 6
  • 12
6
votes
3 answers

Creating a bookmarklet using webpack, bookmarklet-loader, style and css-loader

I am trying to create a bookmarklet using bookmarklet-loader and the style-loader and css-loader. But I am having trouble importing css into my bookmarklet. This is what I have webpack.config.js: const path = require('path'); const HtmlWebpackPlugin…
arunkumar
  • 32,803
  • 4
  • 32
  • 47
6
votes
1 answer

JSONP for cross-site bookmarklet guidance

I'm looking to build a cross-site bookmarklet that gets a highlighted word, passes it to a CodeIgniter method (domain.com/controller/method), and returns the definition via a dictionary API. I've got a skeleton working well on a single domain, but…
Joshua Cody
  • 3,742
  • 5
  • 32
  • 34
6
votes
1 answer

Bookmarklet - Add an input to middle of a URL?

This is probably extremely simple but I am a total newbie. I use something like this to add an input to the end of an URL javascript: (function() { var val= prompt("Enter #",""); if (val) …
Matt
  • 63
  • 1
  • 3
6
votes
1 answer

If I include jQuery via bookmarklet, will it ruin the original javascript on the site?

I'm creating a bookmarklet and of course I'd like to use jQuery. But, if I include jQuery (append a script-tag to head) on a site, will the site itself work anymore, if it has some other js on? Martti Laine
Martti Laine
  • 12,655
  • 22
  • 68
  • 102
6
votes
1 answer

How to keep $.ajax() async inside $.each() loop but react to result on each iteration

I'm having trouble with some dumb architecture because I'm dumb. I'm trying to loop over YouTube videos posted to Reddit, extract URLs and process them into an .m3u playlist. Full code at Subreddit to YouTube Source Bookmarklet - Play YouTube music…
SouPress
  • 295
  • 1
  • 2
  • 12
6
votes
2 answers

Adding bookmarklet to wordpress post

I'm trying to add a javascript bookmarklet link to a post on my WordPress site. However it isn't coming out in the post preview. When I check the link that WordPress adds to the post it has converted it to javascript:void(0). This simple example…
Jamie Bull
  • 12,889
  • 15
  • 77
  • 116
6
votes
3 answers

Javascript bookmarklet on site with CSP in Firefox

I have a simple Javascript bookmarklet that I put together to run the contents of an appropriate GitHub repository against an external tool: javascript:(function(){ var isApex = false; var sourceLangs =…
6
votes
2 answers

Posting to Wayback Machine Via Bookmarklet

I am trying to use the "Save Page Feature" to make a bookmarklet that allows a user to push a page to the Internet Archive with a single click. From what I've gathered, if I post to http://web.archive.org/save/fullURI It'll save the page at…
Jason Nichols
  • 3,739
  • 3
  • 29
  • 49
6
votes
2 answers

Simple bookmarklet not working in chrome

I am new to bookmarklet coding and i have run into a problem where the regular javascript works fine in the browser but not the bookmarklet version. I had found a bookmarklet which finds a image and turns it into BB code and that works fine, however…
zeddex
  • 1,260
  • 5
  • 21
  • 38
6
votes
4 answers

bookmarklet on https page

I'm trying to make a bookmarklet to use on youtube and other video sites in order to easily get information from the video and store it elsewhere. From today, apparently I can't do that anymore since youtube force itself on a https connection and…
maugch
  • 1,276
  • 3
  • 22
  • 46