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>
//Script by [[User:Animum]] that helps with adding permission templates to Image: and Talk: pages.
 
importScript('User:Animum/urlparameters.js');
 
$(function() {
 if((mw.config.get('wgNamespaceNumber') == 1 || mw.config.get('wgNamespaceNumber') == 6) && UrlParameters["action"] == "edit" && UrlParameters["otrspermission"] == 1) {
  var ticket = prompt("Ticket number:");
  document.editform.wpTextbox1.value = "{{PermissionOTRS\|id\=" + ticket + "}}\n" + document.editform.wpTextbox1.value;
  document.editform.wpMinoredit.checked = false;
  document.editform.wpWatchthis.checked = false;
  document.editform.wpSummary.value = "Adding [[WP:OTRS|OTRS]] permission information";
  document.editform.submit();
 }
});
 
$(function() {
 if(mw.config.get('wgNamespaceNumber') == 6 || mw.config.get('wgNamespaceNumber') == 1) {
  mw.util.addPortletLink("p-cactions", mw.config.get('wgServer') + mw.config.get('wgScript') + "?title=" + encodeURIComponent(mw.config.get('wgPageName')) + "&action=edit&otrspermission=1", "otrs", "ca-permissions");
 }
});
// </nowiki>