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
-1
votes
1 answer

Will onload/ load work on all browsers for ?

I am making a bookmarklet, and I have a need to load scripts. If I bind load /on load to a script element, will it work for all browsers? I have tried to do it on all current browsers, and it seems to work fine. How about older ones? Here is an…
Neta Meta
  • 4,001
  • 9
  • 42
  • 67
-1
votes
3 answers

Replace domain in url for publishers academia login

When working outside of my university IP domain, I have to use a login server to access publishers websites. Most url that were of the form http://pubs.domain.org/XXX.htmlare transformed into…
A postdoc
  • 85
  • 6
-1
votes
3 answers

Javascript/bookmarklet not doing the same thing

document.getElementById('channel_actions').innerHTML = document.getElementById('channel_actions').innerHTML + '
-1
votes
1 answer

Using javascript to make custom bookmark links in Chrome

Before diving into building Chrome browser extensions, I'd like to make a list of bookmarks that, when clicked, use javascript to perform particular actions. I am not 100% sure, but I think these may be referring to as bookmarklets? To start off…
user1729506
  • 975
  • 4
  • 15
  • 28
-1
votes
1 answer

Javascript bookmarklet no change css?

When I go to Google and try this bookmarklet, it doesn't work? Any help please? javascript:void(document.getElementById('lga').style.display == 'none') lga is the logo id which I found by inspecting the element. Thanks!
user1947561
  • 1,117
  • 2
  • 8
  • 13
-1
votes
1 answer

Bookmarklet Image Question

I'm trying to make bookmarklet to IF(url ends in .jpg || .png || .jpeg) dosomething(the url) ELSE onhover of any image, put a 50% opacity red cover over it. And onclick something(this.src) Catch, there might be a link already around it:
steven
  • 13,147
  • 16
  • 39
  • 39
-1
votes
3 answers

Javascript - Can alert boxes be updated?

I am experimenting with JavaScript again, and wanted to make a clock in an alert box (bookmarklet). The following code: javascript:alert(new%20Date().toLocaleString()) will show the time in the format Wednesday, August 08, 2012 12:40:54 AM.…
Ylj
  • 45
  • 1
  • 7
-1
votes
1 answer

Javascript file CROSS DOMAIN true absolute path

I am developing a bookmarklet, that uses a JavaScript file, on cross-domain, and i need to catch the full absolute path of the JavaScript file; Example, i store my JavaScript file on domain.com and i am accesing my script from domain.org My…
Ionut Flavius Pogacian
  • 4,750
  • 14
  • 58
  • 100
-2
votes
1 answer

ie return ')' expected when trying to make bookmarklet

writing a bookmarklet, which is about 300 lines of JS code. been getting all kind of error all day. what I did was write the JS and test in console then I use https://www.toptal.com/developers/javascript-minifier/ to compress the code then add…
Stej
  • 29
  • 5
-2
votes
1 answer

bug when function declaration is not followed by semicolon in emit of ruleset global section?

Here are two rulesets that illustrate a totally unexpected behavior. Is this a bug? Functions get executed even though they are not called anywhere or script breaks with a javascript error. The solution is to always end a declaration with a…
Loic Devaux
  • 316
  • 2
  • 9
-2
votes
1 answer

Removing event listeners to which you do not have a reference

I've written a bookmarklet that creates a Canvas with an event listener tracking mouse clicks that covers the whole page. The problem is that some sites have event listeners on the body of the page that have useCapture set to true. This blocks my…
inavda
  • 333
  • 5
  • 15
-2
votes
1 answer

Bookmarklet JavaScript - add a character X to existing contents of web page element

The code I have below does the copy and flashes a brief confirmation message. I need it to instead add a character X in front of existing contents of that web page element: << ? - if you don't know just walk on by, if you need clarification -…
Alex
  • 55
  • 2
  • 13
-2
votes
1 answer

Bookmarklet - capturing a button click on a webpage

I am more or less a complete beginner. What I want to do is use a bookmarklet to capture when a specific html button on a page is clicked and then start a timer. How would I go about that in javascript?
cats00eye
  • 3
  • 1
-2
votes
1 answer

Converting a with statement to a togglable if

I am trying to make a bookmarklet that I can use to quickly toggle the class/id of elements. I found this [old] code for toggling highlighting links. I have read that the with statement should be avoided unless you are using use strict;. I couldn't…
Ryan B
  • 3,364
  • 21
  • 35
-2
votes
1 answer

How to make bookmarklet to calculate two numbers?

I would like to make a bookmarklet that pop up and takes a number then multiply it by 3.9. Thank you so much.