The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Archive for the ‘Bookmarklet’ Category

How could i get a permanent link for raw file? · community · Discussion #22537 · GitHub

Posted by jpluimers on 2025/12/04

I used [Wayback/Archive] How could i get a permanent link for raw file? · community · Discussion #22537 · GitHub to go

The reason I needed it is that for quite a while now, GitHub has started to display PDF files as preview, and modified the download behaviour to get a blob: link instead of the actual raw file download location.

On the to do list:

  1. figure out the same for raw files in gists
  2. figure out the same for GitLab
  3. convert these into Bookmarklets (fiddle with the bold parts in the above URLs)

Thanks [Wayback/Archive] Lotaristo (Czeslaw Meyer) and [Wayback/Archive] byrneh (Hugh Byrne)

--jeroen

Posted in Bookmarklet, Conference Topics, Conferences, Development, DVCS - Distributed Version Control, Event, gist, git, GitHub, GitLab, Hosting, JavaScript/ECMAScript, Power User, Scripting, Software Development, Source Code Management | Tagged: | Leave a Comment »

Revisited: Bookmarklet to save a page both in the WayBack machine and Archive.is (ending on the latter to solve a reCAPTCHA)

Posted by jpluimers on 2025/09/02

Quite a I while ago, I wrote Bookmarklet to save a page both in the WayBack machine and Archive.is (ending on the latter to solve a reCAPTCHA).

The bookmarklet has been very stable, but as of a week or so I need to press the Enter key for it to actually archive.

The reason is that Archive.is, also known as Archive Today, introduced a new URL parameter for auto-starting the archive of an URL.

The old one looked like this: https://archive.is/submit/?run=1&url=https%3A%2F%2Fwww.youtube.com%2Ffeed%2Fhistory%2Fcomment_history

The new one like this: https://archive.is/submit/?anyway=1&url=https%3A%2F%2Fwww.youtube.com%2Ffeed%2Fhistory%2Fcomment_history&submitid=auT7eAltRDxCOGSjdoRMhu3H9d91VEFlvjVztfvNU8XO0ccAhji5DvTyqQew6rfm

The new submitid URL 40 character base64 parameter is being checked in the back end. One way of obtaining one by loading https://archive.is/ then wait for it’s completion and grab it from there.

The alternative is to wait for the submit page to fully load, then find the “save” button via its HTML <input type="submit" value="save"> and press it.

So that’s on the todo list for the updated Bookmarklet of the above blog post.

For now, I just have to press the Enter key for each archived page, I wonder how long that will last (:

Oh: to get the “do you want to save the page again” URL you will have to know the canonical URL first, as that ID is in the again URL, see the bold bits here:

  1. https://archive.is/c6d09
  2. https://archive.is/c6d09/again?url=https://www.youtube.com/feed/history/comment_history

--jeroen

Posted in archive.is / archive.today, Bookmarklet, Development, Internet, Power User, Software Development, Web Browsers, Web Development | Leave a Comment »

linux – Get final URL after curl is redirected – Stack Overflow (plus some Twitter scraping tricks)

Posted by jpluimers on 2025/08/06

Sometimes I need [Wayback/Archive] Redirect Checker | Check your Statuscode 301 vs 302 on the command-line, so cURL to the rescue: [Wayback/Archive] linux – Get final URL after curl is redirected – Stack Overflow. The relevant portions of answers and comments further below.

TL;DR:

Since I prefer verbose command-line arguments (you can find them at the [Wayback/Archive] curl – How To Use on-line man page) especially in scripts this HTTP GET request is what works with Twitter:

% curl --location --silent --output /dev/null --write-out "%{url_effective}\n" https://twitter.com/anyuser/status/20
https://x.com/anyuser/status/20

This failed (twitter dislikes HTTP HEAD requests):

% curl --head --location --silent --output /dev/null --write-out "%{url_effective}\n" https://twitter.com/anyuser/status/20
https://twitter.com/anyuser/status/20

Notes

Given so many of my scripts now run on zsh, I added the new-line because of command line – Why does a cURL request return a percent sign (%) with every request in ZSH? – Stack Overflow. You can strip that bit.

Note that these do not perform client side redirects, so they do not return the ultimate originating URL https://x.com/jack/status/20 (which was the first ever Tweet on what was back then called twttr) as Twitter on the client-side overwrites window.location.href with the final URL. Similar behaviour for getting the Twitter user handle of a Twitter user ID, more on Twitter tricks below.

Tweet by TweetID trick via [Wayback/Archive] Accessing a tweet using only its ID (and without the Twitter API) – Bram.us.

Further reading (thanks [Wayback/Archive] vise, [Wayback/Archive] Daniel Stenberg, [Wayback/Archive] Ivan, [Wayback/Archive] AndrewF, [Wayback/Archive] Roger Campanera, and [Wayback/Archive] Dave Baird):

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, Batch-Files, Bookmarklet, Communications Development, Conference Topics, Conferences, CSS, cURL, Development, Event, HTTP, Internet protocol suite, JavaScript/ECMAScript, Power User, Scripting, SocialMedia, Software Development, TCP, Twitter, Web Browsers, Web Development | Tagged: | Leave a Comment »

Tootski, a sharing bookmarklet for Mastodon · GitHub

Posted by jpluimers on 2025/08/05

For my research list: [Wayback/Archive] Tootski, a sharing bookmarklet for Mastodon · GitHub

--jeroen

Posted in Bookmarklet, Development, JavaScript/ECMAScript, Mastodon, Power User, Scripting, SocialMedia, Software Development, Web Browsers | Leave a Comment »

Igor Brigadir posted a few useful Twitter search tips a while back: searching tweets, users, disable auto-URL, embedding media, etc

Posted by jpluimers on 2025/07/11

For my link archive:

Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, SocialMedia, Software Development, Twitter, Web Browsers | Leave a Comment »

Alex’s Bookmarklets – New Twitter RSS Bookmarklet, Font Bookmarklet

Posted by jpluimers on 2025/07/09

Some entries for my inspiration: [Wayback/Archive] Alex’s Bookmarklets – New Twitter RSS Bookmarklet, Font Bookmarklet

–jeroen

Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »

GitHub: finding the oldest commit on large repositories

Posted by jpluimers on 2025/06/25

The manual process of getting back to the earliest commit of a GitHub repository is easy for small repositories, but for a large one it is very tedious.

TL;DR: there are various ways, but the easiest was the INIT Bookmarklet below.

Note: 2 weeks before the scheduled post made it to the front of the queue, I got a report¹ that it started to fail. Here it still works.

It’s hard to debug because of the functional programming approach taken.

Read the rest of this entry »

Posted in Bookmarklet, C, Conference Topics, Conferences, Development, DVCS - Distributed Version Control, Event, git, GitHub, Go (golang), JavaScript/ECMAScript, Power User, Scripting, Software Development, Source Code Management, Web Browsers | Tagged: , , | Leave a Comment »

Yes, you can globally block JavaScript and enablpe per-site, but you block Bookmarklets too

Posted by jpluimers on 2025/05/16

Trying to trim down excessive CPU usage of my web browsers, and lessen the risk of intrusion, I experimented with globally disabling JavaScript and only enabling it on sites where it adds value to me.

That is possible (see below), but immediately showed a big side effect: Bookmarklets will not work on sites that have JavaScript disabled.

Disabling JavaScript globally only allows Bookmarklets on sites where you have enabled JavaScript. Not the situation I hoped for (:

I’ll try it for a while though.

Read the rest of this entry »

Posted in Bookmarklet, Chrome, Chrome, Development, Firefox, Google, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

Workaround for “embedding” external scripts in JavaScript bookmarklets (thanks @ben_alman).

Posted by jpluimers on 2025/03/25

Bookmarklets are basically URLs that execute a JavaScript function.

Sometimes you want to rely on external JavaScript files (for instance jQuery), but Bookmarklets themselves cannot do that.

Bookmarklets can modify the current page though, and use those to load a script, wait until it is loaded, then continue executing.

Often that is OK as you want to operate the Bookmarklet on that page anyway, but be careful though that you do not mess up the page by loading an incompatible script: test, test, test!

Read the rest of this entry »

Posted in Bookmarklet, Development, JavaScript/ECMAScript, jQuery, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »

Need to write bookmarklet for converting RSS feed URL to PlayerFM import feed URL

Posted by jpluimers on 2025/03/11

Target format:

https://player.fm/importer/feed?url=%s

Where %s is the RSS feed for a podcast as URL encoding.

Example:

https://whycast.podcast.audio/@whycast/feed.xml

becomes

https://player.fm/importer/feed?url=https%3A%2F%2Fwhycast.podcast.audio%2F%40whycast%2Ffeed.xml

Read the rest of this entry »

Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »