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.
1,319
questions
0
votes
0
answers
7
views
How do you click on a data-id using a jquery bookmarklet?
I am trying to create a bookmarklet using jquery that will let me click on a specific name from a data-id lets say John Smith but I am not sure how to do it correctly
I know that I will need to do ...
0
votes
0
answers
21
views
how to disable or block bookmarklets on my website
i have a problem with facebook pixel some dropshipping site owners on shopify are using the bookmarklet below to receive similar product ads in product mining tools
javascript:(function(){ var codigo =...
0
votes
0
answers
41
views
How do I use Bookmarklet javascript to auto-populate webpage
G'day All,
I'm new to Bookmarklets but have been able to get radio buttons, checkboxes, text fields and form submission working on a number of sites.
However I've hit a brick wall with the Optus (...
2
votes
3
answers
146
views
How to create a basic bookmarklet that mimics Selenium?
I know Selenium, Java/Python, XPaths etc and am looking for a basic "skeleton" Javascript bookmarklet that lets me perform simple Selenium like operations on the current page, e.g. (...
-1
votes
1
answer
71
views
Using JavaScript in Browser's Bookmarklet to Edit the URL with Regex
So I know it's possible to run JavaScript by storing them in the browser's bookmark (aka. bookmarklet), but I'm not sure if it's possible to use bookmarklet to auto-edit the current URL (and then ...
0
votes
0
answers
10
views
Bookmarklet to open a specific calendar only in Google Calendar
How can I create a bookmarklet that after opening google calendar (code working for this), selects just one specific calendar (see image)
enter image description here
This is the code I have so far to ...
1
vote
0
answers
13
views
Is it possible to edit scripts on a website using bookmarklets?
I am trying to edit a script on a website, but I currently don't have access to inspect element and need to use bookmarklets. Is is possible to edit scripts on a website using bookmarklets?
Thanks for ...
1
vote
0
answers
14
views
How do I insert html into the body of a page for a bookmarlet
I'm trying to make a bookmarklet for a game mod it includes a UI and I'm not sure how I can make it into a working bookmarklet where your UI would overlay on the screen. I need all the scripts and ...
0
votes
0
answers
6
views
Bookmarklet redirecturl trims off #tag
I have a bookmarklet I use to autologin to certain test sites but I have it to where I can redirect them to specific pages after the login occurs. However the urls I try to redirect to contain #...
2
votes
4
answers
157
views
convert javascript code to bookmarklet for easy access
I have this code that I am trying to use as a bookmarklet.
fetch('https://hf.space/embed/Alifarsi/news_summarizer/+/api/predict/', { method: "POST", body: JSON.stringify({"data":[ &...
-3
votes
2
answers
123
views
extract only sort function from code block
I am using the following bookmarklet to sort textarea ascending or descending. It is working as expected.
But I do not need descending sort option and there is no need of arrows like '↑' or '↓'
I am ...
0
votes
3
answers
39
views
sort unique values on the same line
If I have a list of items like this in any text-area, I can use a bookmarklet to sort the unique values.
a
b
d
c
c
I click on the bookmarklet and the list is corrected to:
a
b
c
d
code:
javascript: (...
1
vote
1
answer
41
views
Can I use a javascript bookmarklet to copy a Youtube transcript without timestamps, now that they removed this option?
There used to be an option on Youtube to remove timestamps from the transcript, which I often used to copy it to the clipboard. No longer. Now my solution is to go into the Code Inspector, and set the ...
1
vote
1
answer
27
views
How can I fill in simple forms using bookmarklets? Trouble shooting my simple code
Good afternoon,
To save time at work, I am trying to use js autofill scripts. Bookmarklets seems to be the best way of doing this but the simple code I have doesn't seem to work.
As a test page, I ...
0
votes
0
answers
14
views
Reading local file using bookmarklet
I am trying to read a local text file, only using Chrome Bookmarklet. I cannot use extensions or install any software, though I can use js libraries which can be used in a bookmarklet like jquery. ...
0
votes
0
answers
40
views
How to window.open with encoding
My code: javascript:var a="https://virustotal.com/gui/search/"; var b=a+encodeURIComponent(location.host)+encodeURIComponent(location.pathname); open(b);
When I do this, it does not encode ...
-1
votes
1
answer
37
views
How do I make an alert box's input change the value in localstorage? [closed]
I'm trying to make a bookmarklet that modifies the "local storage" for a game online, but I want it to question the user the amount of "coins" the user wants via an alert.
This is ...
0
votes
1
answer
39
views
Discord 'refused to load the script'
I am trying to make a bookmarklet that shows my password when clicked before I log in on discord. I am running the javascript locally from another file called bookmarklet.js. The script will not run ...
0
votes
0
answers
20
views
Self-changing javascript bookmarklet?
Basically, I have a bookmarklet with code in it that I can and want to update later.
Is it possible to make the bookmark update itself if it is out of date? I don't want to force my users to always ...
0
votes
1
answer
14
views
JavaScript bookmarklets don't modify the correct document.activeElement?
I am trying to use a bookmarklet to modify the content of the currently-active textbox.
If I write let a = document.activeElement; console.log(a), then in my console, I see the currently-active ...
0
votes
2
answers
22
views
Check a checkbox based on text that follows in a different div?
Is there a way to check checkboxes based on text that follows them? An App at work that requires me to check ALOT of boxes depending on the text that follows. Seems like it could be done ...
0
votes
1
answer
39
views
I am trying to be able to open a text prompt and take the input as the url how would i do that?
I want to be able to input the URL I want to use into a text box and have to take me to that website, how would I do that?
javascript:(function() {document.body.innerHTML+='<iframe style=\"...
0
votes
0
answers
124
views
Bookmarklet (Javascript) navigates to source code as URL instead of executing javascript
am having a problem with EDGE in Compatiblity mode (IE11) where a bookmarklet is not executed.
Browser: MS Edge in Compatibility mode IE11 (not interchangeable with other browser)
Bookmarklet:
...
0
votes
0
answers
51
views
Appending a url using a bookmarklet and clipboard item
I want to append text that has been copied to the clipboard to the end of a url when a bookmarklet is used.
i.e. highlight text, copy and click the bookmarklet and I go to a url with the copied text ...
1
vote
1
answer
417
views
Simple JavaScript Bookmarklet not working on EDGE compatibility mode ie11
I am trying to run the following JavaScript as a test on a website / webapp*.
javascript: {window.alert("Hello World")}
*This website / webapp forces the EDGE browser to run on IE11 ...
1
vote
0
answers
32
views
Bookmarklet to control jscontroller
I use javascript bookmarklets to control window layouts on a page, but one of the elements will be repositioned by another element. If I go into inspect source, I can see the jscontroller attribute ...
0
votes
0
answers
17
views
How do I edit a bookmarklet to replace slashes with plus signs, but then add back in a new URL at the beginning?
I need the bookmarklet to do this:
Replace all slashes with plus signs.
Add a new set of text to the beginning, before what was done in step 1.
Open the new URL in a new tab.
For example:
Turn the ...
-1
votes
1
answer
117
views
How to reoder video tiles in Jitsi?
Last year, I wrote a bookmarklet that allowed to reorder Jitsi video tiles in alphabetic order.
Unfortunately, the script does not seem to work with the recent Jitsi versions anymore.
I have already ...
0
votes
0
answers
26
views
How do I detect a keydown event in google docs with a JS bookmarklet?
I have been trying to make a JS bookmarklet that will make a sound on any keydown and keyup events, and on most websites it's been working. However, it doesn't work in google docs, where I wanted to ...
0
votes
1
answer
28
views
Function onclick not working for multiple windows
I am making a simple javascript clicker game. Both the document.onclick and the clicksWin.onclick work fine but for some reason the multiWin.onclick does nothing.
Here is my code:
var clicksWin = ...
0
votes
0
answers
21
views
How do I get this bookmarklet to not highlight all of the same instances but only the one I have selected?
How do I get this bookmarklet to not highlight all of the same instances but only the one I have selected? If possible could you add another script or way to make it so you can unhighlight it by ...
2
votes
1
answer
101
views
Is hiding Youtube Shorts elements with a bookmarklet possible?
There is a uBlock filter floating around which hides all video thumbnails, if the time span of the associated text is shorter than 70 seconds:
www.youtube.com##ytd-browse ytd-grid-video-renderer:has(...
0
votes
0
answers
86
views
Disable chrome extensions with bookmarklet
I have a question could you disable a chrome extension with a bookmarklet because some extensions are useful but are not needed as of now. I don't want to go through the trouble of deleting extension ...
0
votes
1
answer
78
views
Bookmarklet to turn on Dark Theme on Youtube
Sorry for posting an unsophisticated question.
I'd like to use Youtube with Dark Mode always on, but sometimes the configurations are reset and I have to click the icon button, Appearance and then ...
1
vote
0
answers
33
views
sort tables bookmark using correct date format
I am trying to write a bookmarklet utility that will sort tables shown in the browser.
I use this...
javascript:function toArray (c){var a, k;a=new Array;for (k=0; k<c.length; ++k)a[k]=c[k];return ...
0
votes
0
answers
79
views
Why does this function prompt twice?
I've written a bookmarklet for clicking a controllable amount of times on a HTML element (for clicker games, the like). However, when I run it, it prompts "How many times do you want to click?&...
1
vote
0
answers
29
views
Prevent the variable's value from being written to the `body' of the page [duplicate]
When we write the code below in the Firefox web browser bookmark, the result 3 is written to the body of the current page:
javascript:
var x = 2;
x += 1;
To avoid this, it is possible to add var ...
0
votes
0
answers
29
views
Bookmarklet that opens page and executes script on it in firefox
I've only found old posts on this, like this post that states how it is possible on chrome, older would say it's not possible.
I tried this
javascript:(function () {
location.assign("https://...
-2
votes
1
answer
40
views
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/...
0
votes
1
answer
41
views
how can i use a book marklet to temporarily disable an event handler in my website?
i made a simple button clicker website in which every time you click the button, it adds to a counter. here is the url:
https://joeceb.w3spaces.com/button-clicker.html
the code was pretty basic and it ...
0
votes
0
answers
36
views
if statement in a bookmarklet not working
I made a bookmarklet for people in my school. Here is the code: document.body.contentEditable=true; there is also another bookmarklet to turn it off: document.body.contentEditable=false; These worked, ...
0
votes
0
answers
34
views
Open "about:xxx" via bookmarklet [duplicate]
I just played around with bookmarklets for a little while now, so I hope this question isn't too dumb.
My goal is to open about:profiles (Firefox V93.0) via a bookmark in a new tab. Opening a regular ...
0
votes
0
answers
42
views
How to create a search window inside of a tab with a bookmarklet, while also giving it focus?
This is my first question, sorry If some of it is formatted incorrectly. I have been trying to make a tab of its own pop-up inside of another using bookmarklets on chrome, to be able act as its own ...
0
votes
0
answers
29
views
Is there a way to put a bookmarklet in an email?
I'm trying to send my friend a bookmarklet as a link in gmail. so in order to run it all he has to do is click on the link. but when I put the code into the URL place of the linker in gmail. it says ...
0
votes
2
answers
306
views
Bookmarklet to open a webpage and login
I am trying to create a bookmarklet to open a web page, populate credentials, and click login in one shot. Here is the needed bookmarklets:
For opening a webpage:
javascript:location.href='http://www....
0
votes
1
answer
110
views
How can I play an audio bookmarklet on click?
I have tried to make it so when clicked play audio but this code doesn't work. I would also like to know how to implement this code that works.
javascript:(function(){ var style = document....
1
vote
1
answer
103
views
Change the Value of Scratch Variables with a Bookmarklet
I am making an engine on Scratch that works with a bookmarklet to provide more functionality without creating a Scratch extension. I have had no trouble reading variables through the DOM when they are ...
2
votes
1
answer
243
views
Bypassing Chrome's CORB Feature
I'm trying to load some external JavaScript, but Chrome isn't having it.
To be clear, I'm using a bookmarklet to create a new script element, change the src attribute to my source code, and then ...
0
votes
1
answer
60
views
How do I get more than 2k characters of an external js code for a bookmarklet?
I am working on making a auto updating bookmarklet and I was wondering if there was a way to get around the maximum external js code of 2000 characters? And if there is how would I do it?
2
votes
1
answer
236
views
bookmarklet: getting current time of embedded iframe youtube player?
I am novice javascript developer. I have a bookmarklet that can get the current time of a youtube video.
javascript:(function(){
ytplayer = document.getElementById("movie_player");
...