Difference between revisions 650994 and 661950 on guwiki// Original code written by [[User:Ilmari Karonen]] // Rewritten & extended by [[User:DieBuche]]. Botdetection and encoding fixer by [[User:Lupo]] // Validation and further development [[User:Rillke]], 2011-2012 // // Ajax-based replacement for [[MediaWiki:Quick-delete-code.js]] // // TODO: Fix problems with moves of videos // TODO: Delete talk (contracted; show full) }, nominateForDeletion: function(page) { var o = this; // reset task list in case an earlier error left it non-empty this.initialize(); mw.loader.using([' jquery.byteLengthmediawiki.String', 'jquery.ui.dialog'], function() { (require) { var mwStr = require('mediawiki.String'); o.pageName = (page === undefined) ? pageName.replace(/_/g, ' ') : page.replace(/_/g, ' '); o.startDate = new Date(); // set up some page names we'll need later var requestPage = o.pageName; // MediaWiki has an ugly limit of 255 bytes per title, excluding the namespace while ($mwStr.byteLength(requestPage) + $mwStr.byteLength(o.requestPagePrefix.replace(/^.+?\:/, '')) >= 255) { requestPage = $.trim(requestPage.slice(0, requestPage.length-1)); } o.requestPage = o.requestPagePrefix + requestPage; o.dailyLogPage = o.requestPagePrefix + o.formatDate("YYYY/MM/DD"); o.tag = "{{delete|કારણ=%PARAMETER%|subpage=" + requestPage + o.formatDate("|year=YYYY|month=MON|day=DAY}}\n"); (contracted; show full) }); } else { AQD.install(); } }(jQuery, mediaWiki)); // </nowiki> All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://gu.wikipedia.org/w/index.php?diff=prev&oldid=661950.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|