User:EN-Jungwon/test.js

addOnloadHook(function { if (mw.config.get('wgTitle').indexOf("/") != -1 || document.title.indexOf("- History -") != -1)  //no subpages or history     return;  if (mw.config.get('wgCanonicalNamespace') == "User" || mw.config.get('wgCanonicalNamespace') == "User_talk") {     var username = encodeURIComponent( mw.config.get('wgTitle') );     addPortletLink("p-cactions", https://en.wikipedia.org/w/api.php?action=edit&format=json&title=User%3AEN-Jungwon%2Fsandbox%2F3&summary=July&appendtext=%0A*%5B%5BWikipedia%3AAdministrators'%20newsletter%2F%7B%7BSubst%3ACURRENTYEAR%7D%7D%2F%7B%7BSubst%3ACURRENTMONTH1%7D%7D%7C%7B%7BSubst%3ACURRENTMONTHNAME%7D%7D%5D%5D&token=bf8e868ac57f115738a306276f9350096297991a%2B%5C, "ANEWS update", "ca-anewsupdate", "User contributions");  } });