MediaWiki:Common.js

From dmfswiki
Revision as of 22:32, 29 November 2011 by Tiksmoke (Talk | contribs)

Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Clear the cache in Tools → Preferences
/* <pre> */
/* Any JavaScript here will be loaded for all users on every page load. */

self.ws_messages = { 
	'iwtrans':'Its text come from', 
	'iwtrans2':'Its text come from other sub-domains.',
	'optlist':'Display options',
	'hide_page_numbers':'Hide page links',
	'show_page_numbers':'Show page links',
	'layout':'Layout',
	'author':'Author',
	'translator':'Translator', 
	'editor':'Editor', 
	'publisher':'Publisher', 
	'place':'Place', 
	'volume':'Volume', 
	'school':'School', 
	'book':'Book', 
	'collection':'Collection', 
	'journal':'Journal or magazine', 
	'phdthesis':'Thesis, report', 
	'dictionary':'Dictionary', 
	'progress':'Progress', 
	'progress_T':'Done', 
	'progress_V':'To be validated', 
	'progress_C':'To be proofread', 
	'progress_MS':'Ready for Match & Split', 
	'progress_OCR':'Needs an OCR text layer', 
	'progress_L':'Source file is incorrect (missing pages, unordered pages, etc)'
}

importScript('MediaWiki:Base.js');
importScript('MediaWiki:IndexForm.js');
importScript('MediaWiki:InterWikiTransclusion.js');

/* Footnotes as tooltip - from it.wikipedia.org - request by Candalua */

addOnloadHook ( function ()
{
 sups = document.getElementsByTagName("sup");
 for (i=0; i<sups.length; i++)
 {
   note_id = sups[i].childNodes[0].href;
   if (note_id && (note_id.indexOf("#") != -1))
   {
     note_id = document.getElementById(note_id.substr(note_id.indexOf("#")+1));
     if (note_id)
       if (document.all) 
       { 
           sups[i].title = note_id.innerText; 
           sups[i].childNodes[0].title = note_id.innerText; 
       } 
       else 
       { 
           sups[i].title = note_id.textContent; 
      }
   }
 }
})


/* </pre> */