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

Revisited: Bookmarklet for Archive.is to navivate to the canonical link

Posted by jpluimers on 2024/08/27

I put the proper Bookmarklet wrapper around the functions from Bookmarklet for Archive.is to navivate to the canonical link (because especially Firefox needs them):

An immediately invoked function that returns no value or an expression preceded by the void operator will prevent the browser from attempting to parse the result of the evaluation as a snippet of HTML markup:

javascript:(function(){
  //Statements returning a non-undefined type, e.g. assignments
})();

It means they now have become these:

  • Archive.is: navigate canonical URL

    javascript:(function(){location=document.querySelector('link[rel="canonical"]')?.href})();

  • Archive.is: prompt canonical URL

    javascript:(function(){prompt("Anchor",document.querySelector('link[rel="canonical"]')?.href)})();

--jeroen


Archive.is: navigate canonical URL


javascript:(function(){location=document.querySelector('link[rel="canonical"]')?.href})();

Archive.is: prompt canonical URL


javascript:(function(){prompt("Anchor",document.querySelector('link[rel="canonical"]')?.href)})();

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.