Skip to content

Instantly share code, notes, and snippets.

@crossan007
Last active August 30, 2017 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crossan007/48829167098d27cb60bbf8f5af35609b to your computer and use it in GitHub Desktop.
Save crossan007/48829167098d27cb60bbf8f5af35609b to your computer and use it in GitHub Desktop.
Remove Certain colors from the DOM
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