Difference between revisions 40372 and 40373 on zhwikivoyage//<nowiki> (function($){ /* * vim: set noet sts=0 sw=8: (contracted; show full) result.push("(过期:" + new Date($pr.attr('expiry')).toUTCString() + ")"); } if ($pr.attr('cascade') === '') { result.push("(联锁)"); } }); var boldnode;⏎ ⏎ if (!result.length) { var boldnode = document.createElement('b'); boldnode.textContent = "未被保护"; result.push(boldnode); } Twinkle.protect.protectionLevel = result; apiobj.statelem.info(result); window.setTimeout(function() { Morebits.wiki.actionCompleted.postfix = "完成"; }, 500); // restore actionCompleted message }; (contracted; show full) // protect the page Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName'); Morebits.wiki.actionCompleted.notice = "保护完成"; var statusInited = false; var thispage; var allDone = function twinkleprotectCallbackAllDone() { if (thispage) { thispage.getStatusElement().info("完成"); } if (tagparams) { Twinkle.protect.callbacks.taggingPageInitial(tagparams); } }; var protectIt = function twinkleprotectCallbackProtectIt(next) { thispage = new Morebits.wiki.page(mw.config.get('wgPageName'), "保护页面"); if (mw.config.get('wgArticleId')) { if (form.editmodify.checked) { thispage.setEditProtection(form.editlevel.value, form.editexpiry.value); } if (form.movemodify.checked) { thispage.setMoveProtection(form.movelevel.value, form.moveexpiry.value); } } else { thispage.setCreateProtection(form.createlevel.value, form.createexpiry.value); } if (form.protectReason.value) { thispage.setEditSummary(form.protectReason.value); } else { alert("您必须输入保护理由,这将被记录在保护日志中。"); return; } if (!statusInited) { Morebits.simpleWindow.setButtonsEnabled( false ); Morebits.status.init( form ); statusInited = true; } thispage.protect(next); }; if ((form.editmodify && form.editmodify.checked) || (form.movemodify && form.movemodify.checked) || !mw.config.get('wgArticleId')) { protectIt(allDone); } else { alert("请告诉Twinkle要做什么!\n如果您只是想标记该页,请选择上面的“用保护模板标记此页”选项。"); } break; case 'tag': // apply a protection template Morebits.simpleWindow.setButtonsEnabled( false ); Morebits.status.init( form ); (contracted; show full) rppPage.setCreateOption( 'recreate' ); rppPage.save(); } }; })(jQuery); //</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://zh.wikivoyage.org/w/index.php?diff=prev&oldid=40373.
![]() ![]() 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.
|