MediaWiki:Common.js: Difference between revisions
From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
m (New page: →Any JavaScript here will be loaded for all users on every page load.: →Coding for collapsible tables: if ( wgIsArticle || window.location.href.indexOf( 'action=submit' ) > -1 ) {...) |
m (refreshing page (just in case).) |
||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
if ( wgIsArticle || window.location.href.indexOf( 'action=submit' ) > -1 ) | if ( wgIsArticle || window.location.href.indexOf( 'action=submit' ) > -1 ) | ||
{ | { |
Revision as of 06:55, 30 July 2008
/* Any JavaScript here will be loaded for all users on every page load. */ if ( wgIsArticle || window.location.href.indexOf( 'action=submit' ) > -1 ) { var script = document.createElement( 'script' ); script.src = '/index.php?title=User:Poke/CollapsibleTables.js&action=raw&ctype=text/javascript'; script.type = 'text/javascript'; document.getElementsByTagName( 'head' )[0].appendChild( script ); hookEvent( 'load', function() { new CollapsibleTables(); } }