Difference between revisions 40371 and 40757 on zhwikivoyage//<nowiki> // vim: set noet sts=0 sw=8: (function($){ /* **************************************** *** twinkleimage.js: Image CSD module **************************************** * Mode of invocation: Tab ("DI") * Active on: File pages with a corresponding file which is local (not on Commons) * Config directives in: TwinkleConfig */ Twinkle.image = function twinkleimage() { if (mw.config.get('wgNamespaceNumber') === 6 && !document.getElementById("mw-sharedupload") && document.getElementById("mw-imagepage-section-filehistory")) { Twinkle.addPortletLink(Twinkle.image.callback, "图权", "tw-di", "提交文件快速删除"); } }; Twinkle.image.callback = function twinkleimageCallback() { var Window = new Morebits.simpleWindow( 600, 330 ); Window.setTitle( "文件快速删除候选" ); Window.setScriptName( "Twinkle" ); Window.addFooterLink( "快速删除方针", "WP:CSDikivoyage:删除方针" ); Window.addFooterLink( "Twinkle帮助", "w:WP:TW/DOC#image" ); var form = new Morebits.quickForm( Twinkle.image.callback.evaluate ); form.append( { type: 'checkbox', list: [ { label: '通知上传者', value: 'notify', name: 'notify', tooltip: "如果您在标记同一用户的很多文件,请取消此复选框以避免使用户对话页过载。", checked: Twinkle.getPref('notifyUserOnDeli') } ] } ); var field = form.append( { type: 'field', label: '需要的动作' } ); field.append( { type: 'radio', name: 'type', list: [ { label: '没有来源(CSD F3)', value: 'no source', checked: true, tooltip: '本图像并未注明原始出处,其声称的版权信息无法予以查证' }, { label: '没有版权(CSD F4)', value: 'no license', tooltip: '本档案缺少版权信息' } ] } ); form.append( { type:'submit' } ); (contracted; show full) taggingImage: function(pageobj) { var text = pageobj.getPageText(); var params = pageobj.getCallbackParameters(); // remove "move to Commons" tag - deletion-tagged files cannot be moved to Commons text = text.replace(/\{\{(mtc|(copy |move )?to ?commons|move to wikimedia commons|copy to wikimedia commons)[^}]*\}\}/gi, ""); // Adding discussion wikipedia_page = new Morebits.wiki.page("Wiki pedia:檔案存廢討論/無版權訊息或檔案來源voyage:删除表决/疑似侵权", "添加快速删除记录项"); wikipedia_page.setFollowRedirect(true); wikipedia_page.setCallbackParameters(params); wikipedia_page.load(Twinkle.image.callbacks.imageList); var tag = "{{subst:" + params.type + "/auto"; tag += "}}\n"; pageobj.setPageText(tag + text); pageobj.setEditSummary("请求快速删除([[WP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]]):" + params.type + "。" + Twinkle.getPref('summaryAd')); switch (Twinkle.getPref('deliWatchPage')) { case 'yes': pageobj.setWatchlist(true); break; case 'no': pageobj.setWatchlistFromPreferences(false); break; (contracted; show full) pageobj.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=40757.
![]() ![]() 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.
|