Skip to content

Instantly share code, notes, and snippets.

View dmelcer9's full-sized avatar

Daniel Melcer dmelcer9

View GitHub Profile
@dmelcer9
dmelcer9 / JavadocRedirect.js
Created July 26, 2016 19:20
Super simple chrome extension to banish old javadoc from the web.
chrome.tabs.onUpdated.addListener( function (tabId, changeInfo, tab) {
console.log("Tab changed");
if(changeInfo.status == 'complete'){
console.log("Tab changed 2");
chrome.tabs.getSelected(null,function(tab){
if(tab){
console.log("Tab defined");
var current = tab.url;
console.log(current);
var regex = /(https?:\/\/docs\.oracle\.com\/javase\/)(.*)(\/docs\/api.*)/i;