User:Permjak/common.js: Difference between revisions

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
Content deleted Content added
m Maintenance: Replacing addOnloadHook with native jQuery (mw:ResourceLoader/Migration_guide_(users)#addOnloadHook - phab:T130879)
No edit summary
Line 11: Line 11:


importScript('User:Rillke/bigChunkedUpload.js');
importScript('User:Rillke/bigChunkedUpload.js');

if (mw.config.get('wgNamespaceNumber') === 6 && /SVG/i.test(mw.config.get('wgTitle').slice(-3))) / / SVGedit on SVG files only
importScript('User:Rillke/SVGedit.js");

Revision as of 08:27, 17 March 2021

// [[MediaWiki:VisualFileChange.js]]
/* plain upload form */
$(function () {
   var upLI = document.getElementById('n-uploadbtn');
   var upA = upLI.getElementsByTagName('A')[0];
       upA.href = wgScript + '?title=Special:Upload&uploadformstyle=basic';
 
   if (document.getElementById('wpUploadDescription'))
      document.getElementById('wpUploadDescription').style.height = '250px';
});

importScript('User:Rillke/bigChunkedUpload.js');

if (mw.config.get('wgNamespaceNumber') === 6 && /SVG/i.test(mw.config.get('wgTitle').slice(-3))) / / SVGedit on SVG files only
	importScript('User:Rillke/SVGedit.js");