User:PRB/common.js

Source: Wikipedia, the free encyclopedia.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
//importStylesheet('User:Osarius/FloatingTOC.css');
/* Wikipedia:AutoEd/basic.js */
importScript( 'Wikipedia:AutoEd/basic.js' );// Backlink: [[Wikipedia:AutoEd/basic.js]]
mw.util.addPortletLink("p-cactions", "javascript:banana()", "banana", "id_banana_link","","",document.getElementById('ca-move'))

var is_edit_page = function() {
 return Boolean(document.getElementById("editform"))
}

var banana = function(){
  txt = "banana"
  if(is_edit_page()) {
     txt += "-edit"
  }
  
  alert(txt)
}