MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Alan.Myers (talk | contribs) No edit summary |
Alan.Myers (talk | contribs) No edit summary |
||
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. */ | ||
$(function( $ ) { | /*$(function( $ ) { | ||
/* $( '#mw-content-text' ).on( 'click', '.newwin > a', function( e ) { | |||
/* window.open( e.target ); | |||
/* return false; | |||
/* } ); | |||
} ); | /*} ); | ||
/*importScript('MediaWiki:Common.js/Displaytitle.js'); | /*importScript('MediaWiki:Common.js/Displaytitle.js'); |
Latest revision as of 19:03, 19 March 2024
/* Any JavaScript here will be loaded for all users on every page load. */ /*$(function( $ ) { /* $( '#mw-content-text' ).on( 'click', '.newwin > a', function( e ) { /* window.open( e.target ); /* return false; /* } ); /*} ); /*importScript('MediaWiki:Common.js/Displaytitle.js'); importScript('MediaWiki:Common.js/CollapseElements.js'); /* {{DISPLAYTITLE:x}} hack via deadisland.wikia.com (via dev.wikia.com); used on track pages */ /* Source: http://deadisland.wikia.com/wiki/User:Jgjake2/js/DISPLAYTITLE.js */ function fixPageName(){ var newPageTitle = getElementsByClassName(document, 'span', 'changePageTitle')[0]; // Find the span with the new title if(newPageTitle == null) return; // If not found exit var oldPageTitle = getElementsByClassName(document, 'h1', 'firstHeading')[0]; //Find the page's title if(oldPageTitle == null) return; // If not found exit oldPageTitle.innerHTML = newPageTitle.innerHTML; // Set the Title } addOnloadHook(fixPageName); $(document).ready( function() { var tree = $('#wikitext-sidebar'); $('#p-logo').after( tree.html() ); tree.remove(); }); $(document).ready( function() { $('#tree').bind('fancytreeinit', function(event, data) { data.tree.makeTitleVisible(); }); }); $('#mw-mywiki-rights').html('<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">ILSTRAT</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.'); $("a.mw-wiki-logo").attr("href", "https://isgs.illinois.edu"); $("a.mw-wiki-logo").attr("title", "Go to https://isgs.illinois.edu website");