Created
October 5, 2014 18:45
-
-
Save aziraphale/7d71b139ed77a30a75ec to your computer and use it in GitHub Desktop.
Get (canonical) URL bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var u; try { u=document.querySelector("link[rel=canonical]").href; } catch (e) {} if(u){ if(prompt("Canonical URL: - Press OK to navigate", u)) { window.location=u; } else { /* Chrome goes silly if I don't do something here */ u=null; } } else { prompt("No canonical URL found. Displaying current URL:", window.location.href); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment