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

  • Email Subscription

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

    Join 716 other subscribers

Some links and notes as I want to learn about JavaScript in bookmarklets

Posted by jpluimers on 2019/04/11

I wrote about bookmarklets before, but more from a usage perspective, not from a programmers one.

From what I understand now is that:

  • bookmarklets are basically a special form of URI
    • you can use JavaScript in them, but must make sure you do not interfere with existing JavaScript on the page
    • javascript:(function(){ window.open('https://wiert.me/'); })();
  • the URI has limits so,
    • browsers can have length restrictions (some around 500 characters) forcing you to put the actual script on-line as externalised bookmarklet (which won’t work on body-less pages)
    • you will have to encode special characters (and URI decode them before beautifying existing JavaScript bookmarklets)

My first tries will likely be:

  1. a modification of the existing WordPress “Press This” to work with GitHub and keep # fragments
  2. a modification of the existing WordPress “Press This” bookmarklets to open pages in a new tab.
  3. opening the current page as new tabs in both WayBack and Acrhive.is to see which one archives them best
  4. generating a URL with title prepended by the current WayBack or/and Archive.is links

Here are some links I will need  to read in order to get a better understanding:

WordPress sources:

My prior posts: from the usage side:

–jeroen

https://gist.github.com/jpluimers/1afbafbee87f7e7230c23c78d6a7aa23

Leave a Comment

 

Discover more from The Wiert Corner - irregular stream of stuff

Subscribe now to keep reading and get access to the full archive.

Continue reading