Difference between revisions 40377 and 40378 on zhwikivoyage//<nowiki> // vim: set noet sts=0 sw=8: (function($){ /* (contracted; show full) apiobj.statelem.info(result); window.setTimeout(function() { Morebits.wiki.actionCompleted.postfix = "完成"; }, 500); // restore actionCompleted message }; Twinkle.protect.callback.changeAction = function twinkleprotectCallbackChangeAction(e) { var field_preset; var field1; var field2; ⏎ var isTemplate = mw.config.get("wgNamespaceNumber") === 10 || mw.config.get("wgNamespaceNumber") === 828; switch (e.target.values) { case 'protect': field_preset = new Morebits.quickForm.element({ type: 'field', label: '预设', name: 'field_preset' }); field_preset.append({ type: 'select', name: 'category', label: '选择预设:', event: Twinkle.protect.callback.changePreset, list: (mw.config.get('wgArticleId') ? ⏎ ⏎ Twinkle.protect.protectionTypes : ⏎ ⏎ Twinkle.protect.protectionTypesCreate) }); field2 = new Morebits.quickForm.element({ type: 'field', label: '保护选项', name: 'field2' }); field2.append({ type: 'div', name: 'currentprot', label: ' ' }); // holds the current protection level, as filled out by the async callback // for existing pages if (mw.config.get('wgArticleId')) { field2.append({ (contracted; show full) if( !actiontypes[i].checked ) { continue; } actiontype = actiontypes[i].values; break; } var tagparams;⏎ if( !mw.config.get('wgArticleId') ) { tagparams = { tag: 'noop' }; } else if( actiontype === 'tag' || (actiontype === 'protect' && mw.config.get('wgArticleId')) ) { tagparams = { tag: form.tagtype.value, reason: ((form.tagtype.value === 'pp-protected' || form.tagtype.value === 'pp-semi-protected' || form.tagtype.value === 'pp-move') && form.protectReason) ? form.protectReason.value : null, (contracted; show full) } summary = "添加{{" + params.tag + "}}" + Twinkle.getPref('summaryAd'); } protectedPage.setEditSummary( summary ); protectedPage.setPageText( text ); protectedPage.setCreateOption( 'nocreate' ); protectedPage.suppressProtectWarning(); // no need to let admins know they are editing through protection⏎ protectedPage.save(); }, fileRequest: function( rppPage ) { var params = rppPage.getCallbackParameters(); var text = rppPage.getPageText(); var statusElement = rppPage.getStatusElement(); (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=40378.
![]() ![]() 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.
|