Skip to content

Instantly share code, notes, and snippets.

@1nsp1r3rnzt
Created March 19, 2017 03:12
Show Gist options
  • Save 1nsp1r3rnzt/d748a512d41ac1c66e94e9fe8e8682a8 to your computer and use it in GitHub Desktop.
Save 1nsp1r3rnzt/d748a512d41ac1c66e94e9fe8e8682a8 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Carleton_ieee_redirect
// @namespace http://codehealthy.com/
// @version 0.1
// @description This redirects ieee page to carleton university proxy page
// @match http://ieeexplore.ieee.org/document/*
// @copyright 2017, Ranjit Singh Saini
// @run-at document-start
// ==/UserScript==
reToPage("http://ieeexplore.ieee.org/document/");
function reToPage(currentpage){
if(window.location.href.indexOf(currentpage) != -1){
window.location.href = window.location.href.slice(0, -1).replace("http://ieeexplore.ieee.org/document/", "http://ieeexplore.ieee.org.proxy.library.carleton.ca/stamp/stamp.jsp?arnumber=");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment