/*Quick and dirty CSS Naked Day script - removes all linked, embedded and inline styles on April 9th.Works in IE9+, noting conditional comments may still cause problems. Better to do this server-side if you can.The MIT License (MIT) Copyright (c) 2015 Ben Buchanan http://opensource.org/licenses/MIT*/(function(){vartoday=newDate(),month=today.getMonth(),day=today.getDate(),elements,attrs;if(document.querySelectorAll&&month===3&&day===9){// Remove all linked stylesheets and style blockselements=document.querySelectorAll('link[rel="stylesheet"], style');for(vari=0;i<elements.length;i++){elements[i].parentNode.removeChild(elements[i]);}// Remove all inline stylesattrs=document.querySelectorAll('[style]');for(varii=0;ii<attrs.length;ii++){attrs[ii].setAttribute('style','');}// Inject a message at the top of the documentvarmessage=document.createElement('div');varbody=document.getElementsByTagName('body')[0];message.innerHTML='<p>Why is this page looking so simple? It\'s <a href="https://css-naked-day.github.io">CSS Naked Day</a>!</p><hr>';body.insertBefore(message,body.firstChild);}})();
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.