Jump to content

User:Btilm/italic.js

From 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.
addOnloadHook(function() {
addPortletLink("p-cactions",mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + wgPageName + "&action=edit&dt=true","it1","ca-it1","it1","");

  if (location.href.indexOf("&action=edit&dt=true") == -1) return;
  document.getElementById('wpTextbox1').value = "{{italic title}}\n" + document.getElementById('wpTextbox1').value;
  document.getElementById('wpSummary').value = "added italic title tag";
  document.getElementById('wpMinoredit').checked = true;
  document.getElementById('editform').submit();
});