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.
//<nowiki>
function semi() {
document.location=mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + wgPageName + "&action=edit&semi";
}
 
$(function() {
mw.util.addPortletLink("p-cactions","javascript:semi()","+semi","ca-semi","Add semi-protected keypad.","");
 
  if (location.href.indexOf("&action=edit&semi") == -1) return;
  document.getElementById('wpTextbox1').value = '{{Pp-vandalism|small=yes}}\n' + document.getElementById('wpTextbox1').value;
  document.getElementById('wpSummary').value = "Added [[template:Pp-vandalism|vandalism icon]] using a [[User:Btilm/semi.js|semi-automated js tool]] created by [[user:btilm|Btilm]]";
  document.getElementById('wpMinoredit').checked = false;
  document.getElementById('editform').submit();
});
//</nowiki>