Created
February 6, 2015 02:04
-
-
Save karlcow/e54cf6756d361ff70b7b to your computer and use it in GitHub Desktop.
gBack: code for making the opposite of webcompat to github and come back to the issue page. This can't work as a bookmarklet because github is HTTPS. We need to make it as an Addon extension (unfortunately less universal).
This file contains hidden or 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: | |
| l=document.location; | |
| if(l.origin==='https://github.com'){ | |
| githubPathname=l.pathname; | |
| pathArray=githubPathname.split('/'); | |
| webcompatLocation='https://webcompat.com/'+pathArray[3]+'/'+pathArray[4]; | |
| document.location.href=webcompatLocation; | |
| } | |
| else{ | |
| alert('not%20github%20here'); | |
| } | |
| ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment