Skip to content

Instantly share code, notes, and snippets.

@karlcow
Created February 6, 2015 02:04
Show Gist options
  • Select an option

  • Save karlcow/e54cf6756d361ff70b7b to your computer and use it in GitHub Desktop.

Select an option

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).
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