User:シ/altmessages.js

/* initiateNormalMode { writeMessagesBox ; var altUsername="QwerpQwertus"; } initiateEditMode { writeMessagesBox ; var altUsername="QwerpQwertus"; }

function writeMessagesBox { var textPartONE = decodeURIComponent('You%20have%20%3ca%20href=%22http//en.wikipedia.org/w/index.php?title=User%20talk:') var testPartTWO = altUsername var testPartTHREE = decodeURIComponent('&action=purge%22%3Enew%20messages%3C/a%3E.%20(%3Ca%20href=%22http://en.wikipedia.org/w/index.php?title=User%20talk:%20%20%20&diff=cur%22%3Elast%20change%3C/a%3E)%20%3Cspan%20style=%22text-align:right;%22%3E(Courtesy%20of%20%3Ca%20href=%22http://en.wikipedia.org/w/index.php?title=User:QwerpQwertus/altmessages.js%22%3EAltMessages.js%3C/a%3E,%20by%20%3Ca%20href=%22http://en.wikipedia.org/w/index.php?title=User:QwerpQwertus%22%3EQwerpQwertus%3C/a%3E)%3C/span%3E)

var uriEquivOne=decodeURIComponent('You have new messages. (last change) Courtesy of AltMessages.js, by QwerpQwertus ' constructOne = document.createElement("div"); constructOne.id = "messageBox-alt-messages"; constructOne.class = "usermessage"; constructOne.innerHTML = messageBoxText; var cont = document.getElementById("bodyContent"); var alt = messageBoxText alt.insertBefore(cont); }

addOnloadHook(function {  if(wgAction == 'edit' || (wgAction == 'submit' || document.getElementById('wikiDiff')) ){    mw.util.addPortletLink('p-tb', 'javascript:initiateEditMode', 'QWERPQWERTUS', 't-alt-messages', 'Set your AltMessages.js preferences', , );    document.getElementById("t-page-size").firstChild.style.cssText = "color:green;"  }  else if(wgAction == 'view' || wgAction == 'submit' || wgAction == 'purge'){    mw.util.addPortletLink('p-tb', 'javascript:initiateNormalMode', 'QwerpQwertus', 't-alt-messages', 'Set your AltMessages.js preferences Note your current edit will be saved', , );    document.getElementById("t-page-size").firstChild.style.cssText = "color:green;"  } }); initiateEditMode { alert('A confirmation alert hopefully triggered by clicking the link while in edit mode'); }; initiateNormalMode { alert('A confirmation alert hopefully triggered by clicking the link while viewing something'); };