Team:Freiburg/Templates/html/js.html
From 2014.igem.org
(Difference between revisions)
Line 28: | Line 28: | ||
parent = parent.parentNode; | parent = parent.parentNode; | ||
} | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function hasClass( elem, klass ) { | ||
+ | return (" " + elem.className + " " ).indexOf( " "+klass+" " ) > -1; | ||
+ | } | ||
+ | |||
+ | // remove unnecessary css | ||
+ | if (hasClass(document.body, 'mediawiki')){ | ||
+ | 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(); | ||
} | } | ||
} | } | ||
Line 40: | Line 52: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
$(window).load(function() { | $(window).load(function() { | ||
Revision as of 18:11, 7 October 2014