MediaWiki:Gadget-predefined-summaries.js
Appearance
From mediawiki.org
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
if(window.resumeDeluxe===undefined&& $.inArray(mw.config.get('wgAction'),['edit','submit'])>-1&& mw.util.getParamValue('section')!='new'){ //Checker varresumeDeluxe={ titles:["orthography","- typography","- categorization", "- order","- translation","- wikification", "- image","- redirect","- style","- comment","- support","- oppose", "- revert","- reorganization","- answer", "- maintenance","- add","- template","- fix","- links","- warn","- update"], inputs:["orthography","typography","categorization", "order","translation","wikification", "image","redirect","style","comment","support","oppose", "revert","reorganization","answer", "maintenance","add","template","fix","links","warn","update"] }; window.resumeDeluxe=resumeDeluxe; (function($,mw,undefined){ 'use strict'; resumeDeluxe.addToSummary=function(str){ var$summary=$('#wpSummary'); if($summary.val()){ $summary.val($summary.val()+'; '+str); }else{ $summary.val(str); } returnfalse; }; functionDeluxeSummary(){ if($('#wpSummaryLabel')[0]!==undefined){ varstr='Predefined summaries: ', numResumenes=resumeDeluxe.titles.length, tmp, i; $('#wpSummary').width('95%'); for(i=0;i<numResumenes;i++){ tmp=resumeDeluxe.inputs[i]; str+="<a href=\"#\" onclick=\"return resumeDeluxe.addToSummary('"+ tmp.replace(/[']/g,"\\'")+"');\""+ " class=\"sumLink\" title=\"Add to edit summary\">"+ resumeDeluxe.titles[i]+"</a> "; } $('#wpSummaryLabel').prepend(str+'<br>'); } } $(document).ready(DeluxeSummary); })(jQuery,mediaWiki); } //</nowiki>