你现在正在访问的是萌娘百科用于保存和管理图片、音频等媒体文件的子项目萌娘共享,想要回到萌娘百科,请使用浏览器上的返回按钮、或点击这里
“MediaWiki:Gadget-registerToDelete.js”的版本间的差异
第15行: | 第15行: | ||
if (reason === null) return; | if (reason === null) return; | ||
windows.open(location.origin + location.pathname + (location.search || '?action=edit') + '&preloadText={{即将删除|' + reason + '}}', '_blank'); | windows.open(location.origin + location.pathname + (location.search || '?action=edit') + '&preloadText={{即将删除|' + reason + '}}', '_blank'); | ||
− | }); | + | }).appendTo($('<li/>').attr('id', 'ca-registerToDelete').prependTo(self)); |
}); | }); |
2017年1月15日 (日) 16:12的版本
$(function() { var self = $('#p-cactions .menu ul'); if (!self.find('li')[0]/* || mw.config.get('wgUserGroups').indexOf('patroller') === -1*/) return; if (mw.config.get('wgAction') === 'edit' && decodeURIComponent((/preloadText=[^\&]+/.exec(location.search) || [''])[0])) $('#wpTextbox1').val(decodeURIComponent((/preloadText=[^\&]+/.exec(location.search) || [''])[0])); else if (mw.config.get('wgAction') !== 'submit') $('<a/>', { attr: { href: "#", title: "挂删本页[alt-shift-d]", accesskey: 'd' }, text: '挂删' }).on('click', function() { var reason = prompt('挂删的理由【将会替换全文内容】\n【空白则使用默认理由(不在收录范围内或潜在价值较低)】\n【取消则不进行挂删】:'), self = $(this); if (reason === null) return; windows.open(location.origin + location.pathname + (location.search || '?action=edit') + '&preloadText={{即将删除|' + reason + '}}', '_blank'); }).appendTo($('<li/>').attr('id', 'ca-registerToDelete').prependTo(self)); });