News for hackers. Stuff that matters.
Re:Ask HN: What are the most useful bookmarklets you use? by raulmartin on Monday March 18, 2024 @11:32AM (#39745913)
Re:Ask HN: What are the most useful bookmarklets you use? by cranberryturkey on Monday March 18, 2024 @11:01AM (#39745507)
Re:Ask HN: What are the most useful bookmarklets you use? by vmoore on Monday March 18, 2024 @12:35PM (#39746662)
Re:Ask HN: What are the most useful bookmarklets you use? by perilunar on Tuesday March 19, 2024 @12:13AM (#39752889)
I have a couple I use constantly to kill fixed and sticky page elements. Makes the web much more usable. Also use the pinboard bookmarklet quite often.
Re:Ask HN: What are the most useful bookmarklets you use? by kcrwfrd_ on Tuesday March 19, 2024 @01:05AM (#39753102)
A “show passwords” bookmarklet, turns any password input into normal text.
Re:Ask HN: What are the most useful bookmarklets you use? by madacol on Thursday March 21, 2024 @02:58PM (#39782900)
On firefox you can right click -> "Reveal password"
Re:Ask HN: What are the most useful bookmarklets you use? by treetalker on Tuesday March 19, 2024 @03:26AM (#39753624)
Re:Ask HN: What are the most useful bookmarklets you use? by Leftium on Wednesday March 20, 2024 @02:38AM (#39763436)
I have 3 bookmarklets:

1. I made a custom "Toggle" bookmarklet that toggles between various sites. For example between:

- https://hw.leftium.com/#/item/39745425 and https://news.ycombinator.com/item?id=39745425

- Kagi.com and Google.com

- Google form/sheet and my beautifier: https://g.leftium.com/pretty

2. Allow Paste: https://bookmarkl.ink/ashtonmeuser/6e3869d8e468e016f22a4b4de...

3. Special toggle between Kagi Summarize, Kagi Key Moments, and original URL

I also run several "permanent bookmarklets" via ViolentMonkey/TamperMonkey: https://hw.leftium.com/#/item/39621056

---

Related HN post/discussion: https://hw.leftium.com/#/item/38014069

Re:Ask HN: What are the most useful bookmarklets you use? by treetalker on Wednesday March 20, 2024 @03:17AM (#39763603)
Please link the code for your toggle bookmarklet! I’m particularly interested in the one to cycle between the original URL and Kagi Summarizer etc. :-D
Re:Ask HN: What are the most useful bookmarklets you use? by Leftium on Wednesday March 20, 2024 @12:01PM (#39768406)
Re:Ask HN: What are the most useful bookmarklets you use? by treetalker on Thursday March 21, 2024 @03:17AM (#39775629)
This is great, thank you! :-D
Re:Ask HN: What are the most useful bookmarklets you use? by wruza on Wednesday March 20, 2024 @06:01AM (#39764533)
Images: presents an overlay with all images found in <img> tags.

Unshorts:

  javascript:(function(){location.href=location.href.replace('/shorts/','/watch?v=')})();
Re:Ask HN: What are the most useful bookmarklets you use? by perilunar on Thursday March 21, 2024 @01:55AM (#39775227)
Nice!

Took Unshorts a step further: remove all shorts from a page:

  javascript:(function(){document.querySelectorAll("a").forEach((a)=>{if(a.href.includes('/shorts/')){a.remove();}});})();
Re:Ask HN: What are the most useful bookmarklets you use? by madacol on Thursday March 21, 2024 @01:57PM (#39782065)
- Open npm package on socket.dev

    javascript:location.href=document.location.href.replace("www.npmjs.com/", 'socket.dev/npm/');

- Edit any text on any page

    javascript: (function() {   document.body.contentEditable = true;   document.body.spellcheck = false;  })();

- Highlight selected text (wraps selection in <mark> tags)

this one is complex, see it here: https://getbookmarklets.com/scripts/https%3A%2F%2Fraw.github...

---

BTW, I am building https://getbookmarklets.com precisely because I want a place to share bookmarklets

I am trying to make the site as simple as possible on the server-side by only storing the URL of the bookmarklet, everything else is derived on the client side from the URL, similar to how bookmarkl.ink does it

I am still figuring out how to make it resistant to spam, I don't want it to become like the userscript sites where you can't find a simple useful script, they all seem to be ultra specific and very complex scripts that are hard to verify.

Any feedback is appreciated

Re:Ask HN: What are the most useful bookmarklets you use? by madacol on Thursday March 21, 2024 @04:36PM (#39784067)
I also think we need some kind of bookmarklet manager to show only the relevant bokkmarklets depending on the webpage in display
Re:Ask HN: What are the most useful bookmarklets you use? by nbbaier on Thursday March 21, 2024 @06:45PM (#39785362)
I've seen this extension but haven't done much about trying it out: https://chromewebstore.google.com/detail/powerlet/ofecodkcad...
Re:Ask HN: What are the most useful bookmarklets you use? by nbbaier on Thursday March 21, 2024 @06:45PM (#39785367)
Excited about https://getbookmarklets.com/, I'll check it out!
Re:Ask HN: What are the most useful bookmarklets you use? by adiabatty on Sunday March 24, 2024 @03:58PM (#39809919)
https://alisdair.mcdiarmid.org/kill-sticky-headers/

Also, to nicely format the Jira issue I'm looking at, to paste into task trackers:

    javascript: (() => {
      const tagEl = document.querySelector(
        '[data-testid="issue.views.issue-base.foundation.breadcrumbs.current-issue.item"]'
      );
      if (!(tagEl instanceof HTMLElement)) return;
      const tag = tagEl.innerText;
    
      const nameEl = document.querySelector(
        '[data-testid="issue.views.issue-base.foundation.summary.heading"]'
      );
      if (!(nameEl instanceof HTMLElement)) return;
      const name = nameEl.innerText;
    
      const text = `[${tag}] ${name}`;
      navigator.clipboard.writeText(text);
    })();