Team:Freiburg/Templates/html/inlinejs.html
From 2014.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
<script> | <script> | ||
(function(){ | (function(){ | ||
- | + | function hasClass( elem, klass ) { | |
- | + | return (" " + elem.className + " " ).indexOf( " "+klass+" " ) > -1; | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | // | + | // remove unnecessary css |
- | + | if (hasClass(document.body, 'mediawiki')){ | |
- | if ( | + | var unwantedStylesheets = document.head.querySelectorAll('head link[rel="stylesheet"], head style[type="text/css"]'); |
- | + | for (var i=0;i<unwantedStylesheets.length; i++){ | |
- | + | unwantedStylesheets[i].remove(); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
} | } |
Revision as of 18:14, 7 October 2014