Team:St Andrews/Template:Header
From 2012.igem.org
(Difference between revisions)
(Undo revision 9480 by Aleksejs.sazonovs (talk)) |
(Added DTU's JS hack to kill empty <p>-tags) |
||
Line 13: | Line 13: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | // HAX | + | // WARNING: TOTAL HAX |
function onBodyLoad () { | function onBodyLoad () { | ||
// Move the terrible MediaWiki menus to the global wrapper where they're actually visible. | // Move the terrible MediaWiki menus to the global wrapper where they're actually visible. | ||
Line 19: | Line 19: | ||
// (Duplicate ids that we can't change are so fun to work around. The first iter moves the left side bar | // (Duplicate ids that we can't change are so fun to work around. The first iter moves the left side bar | ||
// and the second the right side bar...) | // and the second the right side bar...) | ||
+ | <!-- Remove all empty <p> tags (MediaWiki puts them EVERYWHERE, thanks millions to DTU-Denmark again!) --> | ||
+ | $(document).ready(function() { | ||
+ | $("p").filter( function() { | ||
+ | return $.trim($(this).html()) == ''; | ||
+ | }).remove() | ||
+ | }); | ||
} | } | ||
</script> | </script> |
Revision as of 10:20, 8 June 2012