MediaWiki talk:DeleteKeep.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

How to use it[edit]

document.write('<script type="text/javascript" src="' 
            + 'http://commons.wikimedia.org/w/index.php?title=MediaWiki:DeleteKeep.js' 
            + '&action=raw&ctype=text/javascript&dontcountme=s"><\/script>');
//MediaWiki:DeleteKeep.js

and if it's not added yet:

 document.write('<script type="text/javascript" src="'
            + 'http://commons.wikimedia.org/w/index.php?title=User:Polarlys/quickbar.js'
            + '&action=raw&ctype=text/javascript&dontcountme=s"><\/script>');
//User:Polarlys/quickbar.js

// From en:User:Lupin/autoedit.js
function getParamValue(paramName) {
  var cmdRe=RegExp('[&?]'+paramName+'=([^&]*)');
  var h=document.location;
  var m=cmdRe.exec(h);
  if (m) {
  try {
    return decodeURIComponent(m[1]);
  } catch (someError) {}
  }
  return null;
}