Last active
August 30, 2017 18:38
-
-
Save crossan007/48829167098d27cb60bbf8f5af35609b to your computer and use it in GitHub Desktop.
Remove Certain colors from the DOM
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() { | |
if (! window.jQuery) { | |
var script = document.createElement("SCRIPT"); | |
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'; | |
script.type = 'text/javascript'; | |
script.onload = function() { | |
var $ = window.jQuery; | |
}; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
} | |
var checkReady = function(callback) { | |
if (window.jQuery) { | |
callback(jQuery); | |
} | |
else { | |
window.setTimeout(function() { checkReady(callback); }, 20); | |
} | |
}; | |
checkReady(function($) { | |
$(function() { | |
console.log("jquery loaded"); | |
ugly=$('*').each(function(index,object) { | |
unUgly($(object).get(0)); | |
}); | |
}); | |
}); | |
function unUgly(object) | |
{ | |
computedStyle=window.getComputedStyle(object); | |
if (computedStyle.backgroundColor.indexOf("255, 82, 0") > -1 ) { | |
$(object).css("background-color","#888888"); | |
} | |
if(computedStyle.color.indexOf("255, 82, 0") > -1 ) { | |
$(object).css("color","#999999"); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment