Last active
August 16, 2017 09:21
-
-
Save eviltester/65d6f47950699646c8e2cb0fe382b4fe to your computer and use it in GitHub Desktop.
run bookmarklet on http.cat to link page to httpstatuses.com
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:(function(){var%20cats=document.querySelectorAll(%22li.status%22);%20for%20(var%20i%20=%200,%20len%20=%20cats.length;%20i%20%3C%20len;%20i++)%20%7B%20cats%5Bi%5D.innerHTML%20+=%20%22%5Binfo%5D%22.link(%22https://httpstatuses.com/%22+cats%5Bi%5D.innerText);%20%7D})() |
You can create a bookmarklet link by converting the above code to http://compendiumdev.co.uk/apps/eviltester/bookmarklets.html or just copy the raw contents of gistfile1.txt into your browser bookmarks. Or run the code in the comment above in your dev console when on the http.cat site.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following code, converted to a bookmarklet, when run on http.cats links the cats to the status codes via an "[info]" link
Use of .link is deprecated but works for the moment and kept code short.