Difference between revisions of "MediaWiki:Common.js"

From relax wiki
Jump to navigation Jump to search
m (UploadWizard message fix.)
 
(41 intermediate revisions by 2 users not shown)
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. */
 
  
 
/* Improvements for the HarvardReferences Mediawiki extension. */
 
/* Improvements for the HarvardReferences Mediawiki extension. */
 
importScript('HarvardReferences.js');
 
importScript('HarvardReferences.js');
importScript('HarvardReferences/HarvardReferences.js');
+
 
importScript('extensions/HarvardReferences/HarvardReferences.js');
+
/* Test function, for testing if js works */
importScript('/www/wiki.nmr-relax.com/extensions/HarvardReferences/HarvardReferences.js');
+
(function () {
importScript('http:/wiki.nmr-relax.com/extensions/HarvardReferences/HarvardReferences.js');
+
 
 +
  var myElement = document.getElementById('mw-testing');
 +
  myElement.innerHTML = 'This is test HTML';
 +
 
 +
}());
 +
 
 +
/* Set some UploadWizard messages */
 +
mw.messages.set('mwe-upwiz-license-gpl-3.0', "GNU General Public Licence 3.0 ([$2 legal code])");
 +
mw.messages.set('mwe-upwiz-source-ownwork-gpl-3.0-explain', "(Anyone may use, share or remix {{PLURAL:$1|this work|these works}}, as long as they credit me and share any derivative work under this licence.)");
 +
mw.messages.set('mwe-upwiz-source-ownwork-assert-gpl-3.0', "I, $2, {{GENDER:$4|the copyright holder}} of {{PLURAL:$1|this work|these works}}, irrevocably grant anyone the right to use {{PLURAL:$1|this work|these works}} under the GNU General Public 3.0 licence ([$3 legal code]).");

Latest revision as of 13:40, 27 October 2020

/* Any JavaScript here will be loaded for all users on every page load. */

/* Improvements for the HarvardReferences Mediawiki extension. */
importScript('HarvardReferences.js');

/* Test function, for testing if js works */
(function () {

  var myElement = document.getElementById('mw-testing');
  myElement.innerHTML = 'This is test HTML';

}());

/* Set some UploadWizard messages */
mw.messages.set('mwe-upwiz-license-gpl-3.0', "GNU General Public Licence 3.0 ([$2 legal code])");
mw.messages.set('mwe-upwiz-source-ownwork-gpl-3.0-explain', "(Anyone may use, share or remix {{PLURAL:$1|this work|these works}}, as long as they credit me and share any derivative work under this licence.)");
mw.messages.set('mwe-upwiz-source-ownwork-assert-gpl-3.0', "I, $2, {{GENDER:$4|the copyright holder}} of {{PLURAL:$1|this work|these works}}, irrevocably grant anyone the right to use {{PLURAL:$1|this work|these works}} under the GNU General Public 3.0 licence ([$3 legal code]).");