[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1758604504447639.png (574 KB, 1079x978)
574 KB
574 KB PNG
MAKE BOOKMARKLETS GREAT AGAIN!
>>
Forgot about those. Remember that one that spams the words of an article on screen so you can read it faster?
>>
how will bookmarklets ever recover
>>
File: 1734530218836680.jpg (60 KB, 687x500)
60 KB
60 KB JPG
>>106982895
>>
>>106982828
>Remember that one that spams the words of an article on screen so you can read it faster?
I remember a classmate mentioning something like that about a decade ago, but it might've been an app.

Either way, I've been looking into Bookmarklet compilations. I think they mostly went away because everyone who's not a webdev focused on extensions and userscripts instead. But I think bookmarklets still have their use cases.
>>
I have a few but I’m not linking to them
ChatGPT is great at writing them though
>>
>>106983511
Tell us what they do at least. I want to make my own, but I can't think of any use cases.
>>
>>106983569
not op, I have a bookmarklet that opens the camelcamelcamel page for the amazon page you're on, very useful, and writing an extension for this is overkill.
>>
>>106984181
That does seem interesting, thanks for the idea!
>>
While we're on the topic, is there a Greasyfork equivalent for bookmarklets? It feels like there should be one.
>>
Love bookmarklets. I use https://mrcoles.com/bookmarklet/ for easy generation
Firefox on Android has broken bookmarkets years ago as a result of yet another rewrite and never bothered reinstating them back. Thanks Mozilla, as always.
>>
>>106982487
Before you could right click a video to make it loop, I used a bookmarklet to make them loop.
Have also used them to unbreak sites.
They've mostly been displaced with browsers and extensions adding extra features, but can come in handy on occasion.
>>
>>106984181
>and writing an extension for this is overkill.
not really. its much preferable to have say a visible button from the userscript on every amazon page that says 'go to camel'
rather than u remembering to click a bookmarklet

infact the bookmarket is probably more difficult to code because it has to be shoved into one line and other nonsense
>>
>>106985738
>infact the bookmarket is probably more difficult to code because it has to be shoved into one line and other nonsense
I don't know if it's a visual bug, but I've seen userscripts written like that. I get suspicious when I see it, even if it isn't intentionally made difficult to read.

Either way, I wouldn't mind having a bookmarklet folder on my bookmark toolbar to activate stuff from, I wouldn't say it's worse than a userscript.
>>
>>106985255
I've seen a number of these sites that help with generating them.

My issue is that I'm not very imaginative, I usually see something useful and go "wow, I never knew I needed that!". Which is much easier to do with extensions and userscripts because there's a ton of them, whereas bookmarklets don't really have dedicated sites for user submissions from what I can tell, it's all on various spread out GitHub pages and the like. Still worth a deep dive probably.
>>
>>106986057
you defnitely should have suspicion. its a form of obfuscation, though its also referred to as 'minification'
scriptName.min.user.js

which just removes empty lines, white space, etc, as a form of optimization, but for a user script this is just sketchy.

>Either way, I wouldn't mind having a bookmarklet folder on my bookmark toolbar to activate stuff from, I wouldn't say it's worse than a userscript.
with LLMs making userscripts so utterly trivial to crank out, i've found myself making them for all kinds of websites.
adding new functions and features, for example a movie streaming website i use, i made a user script to use local storage to have a little 'watch later' icon beside every movie.
>>
>>106985125
There was an OG one years ago, y2k aesthetics and all that, can't find it now and it's not in my bookmarks sadly.
The ones I found by searching "bookmarklets", variations of "bookmarklets share" are very lame and empty
>>
>>106983569
I write a lot of Markdown so I have stuff that takes highlighted text and/or the current page’s URL and makes Markdown links into them
Bookmarks bars were made for bookmarklets
Also I have all my bookmarklets’ names surrounded by brackets
>>106986057
Undoing “shove it all on one line” is easy; just use Prettier (hell, use their website).
If the identifiers are turned into single-letter names then you’re screwed and yeah yeah performance but it still strikes me as suspicious if I can’t see the entire build chain in a GitHub Actions YAML file
>>
>>106983569
More if you’re a Markdown enjoyer:

javascript: (function () {
const activeEl = document.activeElement;
let selectedText = "";

if (
activeEl &&
(activeEl.tagName === "TEXTAREA" ||
(activeEl.tagName === "INPUT" && activeEl.type === "text"))
) {
selectedText = activeEl.value.substring(
activeEl.selectionStart,
activeEl.selectionEnd
);
} else {
selectedText = window.getSelection().toString();
}

if (!selectedText) {
return;
}

const title = document.title;
const url = window.location.href;
const mdLink = `[${title}](${url})`;
const quotedText = selectedText
.split("\n")
.map((line) => "> " + line)
.join("\n");

const result = `${mdLink}\n\n${quotedText}`;

navigator.clipboard.writeText(result).then(
() => {},
(err) => {
console.error("Clipboard copy failed:", err);
alert("Failed to copy: " + err);
}
);
})();


I keep this in a .js file
I thought I’d have to manually tack on the javascript: part but then I remembered that labels in JavaScript are a thing
>>
>>106987899
I think this it (not sure at all) https://www.squarefree.com/bookmarklets/
>>106990354
I have this in my bookmarks, it should generate markdown from a webpage https://gist.github.com/dajare/5371948
>>
File: 1731214334269454.png (32 KB, 1024x675)
32 KB
32 KB PNG
>>106991935
Seems interesting, although that site is ancient. It even uses the old Mozilla logo, it took me a second to realize what I'm looking at.

>Last modified April 22, 2004.
Truly an ancient relic.
>>
>>106982487
they're PWAs now, grandpa
>>
>>106992370
I get that you're probably shitposting, but that would be an actual interesting use of PWAs, whereas I struggle to find one under any other circumstance.
>>
>>106992356
I would expect bookmarklet stuff to be quite ancient, they fell out of fashion against web extensions years ago
Another one https://dmcritchie.mvps.org/ie/bookmarklets.htm
>>
Webdev stuff https://tantek.com/favelets/
Favelets gives more interesting results
>>
>>106982828
https://ph-uhl.com/0010-Bookmarklets/ scoured the archives and found what you're talking about
>>
>>106982487
It's fucked up how a bookmarlet is JavaScript as a bookmark and not a tiny bookmark.
>>
https://desuarchive.org/g/thread/80506247/#80506302 good links there
>>
Some good ones here https://alanhogan.com/bookmarklets



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.