49
submitted 3 days ago* (last edited 1 day ago) by Achyu@lemmy.sdf.org to c/asklemmy@lemmy.ml

Got to know of them recently. They seem very cool.
Like, I don't have to install anything extra.

https://www.freecodecamp.org/news/what-are-bookmarklets/
https://bk7312.github.io/bookmarklets/

I especially like this one that shows Id links. Useful while sharing wikipedia links:
https://github.com/madacol/web-automation/blob/master/bookmarklets/Id%20Linker.js

And

This one which helps to use text fragments:
https://stackoverflow.com/questions/62989058/how-does-text-in-url-work-to-highlight-text#answer-76131511

Discliamer: Be careful with copy-pasting bookmarklets into your browser. Only do so if you trust it.

Which all bookmarklets do you use, find useful?
Please share them.

Are there similar easy things that most people sort of easily have access to? I think Libreoffice's/Excel's record macro function would be useful for people too.

Are there any communities for similar things, sort-of like beginner automation?

Thanks in advance.

top 17 comments
sorted by: hot top controversial new old
[-] mp3@lemmy.ca 16 points 3 days ago

I have the following, which I didn't make myself

DontF-withPaste

javascript:forceBrowserDefault=(e=>{e.stopImmediatePropagation();return true;});['copy','cut','paste'].forEach(e=>document.addEventListener(e,forceBrowserDefault,true));

Purpose: Restore the ability to paste stuff anywhere, some websites will do this in their password field

kill-sticky

(avascript:(function(){document.querySelectorAll("body *").forEach(function(node){if(["fixed","sticky"].includes(getComputedStyle(node).position)){node.parentNode.removeChild(node)}});document.querySelectorAll("html *").forEach(function(node){var s=getComputedStyle(node);if("hidden"===s["overflow"]){node.style["overflow"]="visible"}if("hidden"===s["overflow-x"]){node.style["overflow-x"]="visible"}if("hidden"===s["overflow-y"]){node.style["overflow-y"]="visible"}});var htmlNode=document.querySelector("html");htmlNode.style["overflow"]="visible";htmlNode.style["overflow-x"]="visible";htmlNode.style["overflow-y"]="visible"})();

Purpose: Un-stick anything that remain static when you scroll, ex: website header

[-] Achyu@lemmy.sdf.org 3 points 3 days ago* (last edited 3 days ago)

Thank you

Edit:
The copy-paste bookmarklet does not seem to help with allowing copy-paste in the mobile version of the facebook website.

[-] lime@feddit.nu 3 points 3 days ago

i think touch events need their own specifiers?

[-] WhyJiffie@sh.itjust.works 7 points 3 days ago

I have this to open the site in archive.today:

javascript:void(open('http://archive.today/?run=1&url='+encodeURIComponent(document.location)))
[-] Achyu@lemmy.sdf.org 1 points 1 day ago
[-] Jimmycrackcrack@lemmy.ml 4 points 2 days ago

I've been using this guy's one for years. It's called stretch video

https://gist.github.com/arpruss/74abc1bc95ae08e543b9b74f15a23b07

It's not often I have to use it but if you ever watch something online where the uploader has messed up the aspect ratio you can just fix it just like that, no need to download and reencode or anything I love it.

[-] Naich@lemmings.world 7 points 3 days ago

https://naich.net/useful/

There's a couple there - one changes password fields to text and the other unchecks all the boxes on a page.

[-] nathan@piefed.alphapuggle.dev 3 points 2 days ago

I wrote this one ages ago to throw shopgoodwill.com items in my calendar because the times are in PDT and they don't have any built in notification (that works)

Also made it work with govdeals but I haven't tested that in ages so YMMV

Writes it to a Google calendar URL. I had it write to an ICS file at one point but I don't have version control on this one file

javascript: (
    () => {
        function createItem(productTitle, date) {
            console.log(productTitle, date);
             window.open(`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${productTitle}&details=${productTitle} @ Goodwill ${window.location}&dates=${date}/${date}`);
        }
        if (window.location.href.toString().includes("https://shopgoodwill.com/item/")) {
            try {
                let title = document.querySelectorAll(".mb-4.d-none.d-md-block.ng-star-inserted")[0].innerText;
                let headers = document.querySelectorAll("th.font-weight-bold.text-nowrap");
                let time;
                if (headers[4].innerHTML == " Handling Price: ") {
                    time = headers[5] }
                else {
                    time = headers[4]
                }
                time = time.parentElement.children[1].innerHTML.substring(0, 25) + "DT";
                console.log(headers);
                createItem(title, new Date(time).toISOString().split(".")[0].replace(/-/gi, "").replace(/:/gi, "") + "Z");
            } catch (e) {
                alert("An error occurred, check the console for full details: " + e);
                console.log(e); 
            }
        } else if (window.location.href.toString().includes("https://www.govdeals.com/index.cfm")) {
            try {
                createItem(document.querySelectorAll("#asset_short_desc_id")[0].innerText, new Date(document.querySelectorAll("tr > td[align='right'][nowrap='nowrap'] > b")[0].innerText.replace("ET", "EDT")).toISOString().split(".")[0].replace(/-/gi, "").replace(/:/gi, "") + "Z");
            } catch (e) {
                alert("An error occurred, check the console for full details: " + e);
                console.log(e);
            }
        } else {
            alert("This is not a goodwill or govdeals item page.");
        }
    })();
[-] Supervisor194@lemmy.world 6 points 3 days ago* (last edited 3 days ago)

I wrote this one to strip the custom css from any sub on (old) reddit. I use it on subs I find annoying, like mildlyinfuriating.

javascript:(function(){x=0;s=document.styleSheets;for(const y of s){if(y.title==="applied_subreddit_stylesheet"){if(y.disabled!=true){y.disabled=true;}else{y.disabled=false;}}x++;}})();

[-] kambusha@sh.itjust.works 4 points 3 days ago
[-] Achyu@lemmy.sdf.org 1 points 1 day ago

Thank you. That's cool

[-] hansolo@lemmy.today 2 points 3 days ago

I used to use Power Delete Suite to nuke Reddit comments.

[-] cy_narrator@discuss.tchncs.de 2 points 3 days ago

I should give it a look

[-] cy_narrator@discuss.tchncs.de -4 points 3 days ago

I dont see any use and usage mentioned there is useless

[-] Achyu@lemmy.sdf.org 1 points 1 day ago* (last edited 1 day ago)

No issues.
Maybe you will see a use after some time.
I find the id one useful for sites like wikipedia.
https://en.wikipedia.org/wiki/Bookmarklet#Usage

[-] PrettyFlyForAFatGuy@feddit.uk 4 points 3 days ago

There's literally a "What are bookmarklets" link in OPs post.

I've not heard of them before. i use greasemonkey for this sort of stuff

this post was submitted on 06 Jul 2025
49 points (100.0% liked)

Asklemmy

49290 readers
424 users here now

A loosely moderated place to ask open-ended questions

Search asklemmy ๐Ÿ”

If your post meets the following criteria, it's welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

Looking for a community?

~Icon~ ~by~ ~@Double_A@discuss.tchncs.de~

founded 6 years ago
MODERATORS