Difference between revisions 40370 and 40371 on zhwikivoyage//<nowiki> // vim: set noet sts=0 sw=8: (function($){ /* (contracted; show full) } pageobj.setCreateOption('nocreate'); pageobj.save(); }, userNotification: function(pageobj) { var params = pageobj.getCallbackParameters(); var initialContrib = pageobj.getCreator(); ⏎ // disallow warning yourself if (initialContrib === mw.config.get('wgUserName')) { pageobj.getStatusElement().warn("您(" + initialContrib + ")创建了该页,跳过通知"); } else {⏎ var usertalkpage = new Morebits.wiki.page('User talk:' + initialContrib, "通知上传者(" + initialContrib + ")"); var notifytext = "\n{{subst:Uploadvionotice|" + Morebits.pageNameNorm + "}}--~~~~"; usertalkpage.setAppendText(notifytext); usertalkpage.setEditSummary("通知:文件[[" + Morebits.pageNameNorm + "]]快速删除提名。" + Twinkle.getPref('summaryAd')); usertalkpage.setCreateOption('recreate'); switch (Twinkle.getPref('deliWatchUser')) { case 'yes': usertalkpage.setWatchlist(true); break; case 'no': usertalkpage.setWatchlistFromPreferences(false); break; default: usertalkpage.setWatchlistFromPreferences(true); break; } usertalkpage.setFollowRedirect(true); usertalkpage.append();⏎ } // add this nomination to the user's userspace log, if the user has enabled it if (params.lognomination) { params.fromDI = true; Twinkle.speedy.callbacks.user.addToLog(params, initialContrib); } }, imageList: function(pageobj) { var text = pageobj.getPageText(); var params = pageobj.getCallbackParameters(); pageobj.setPageText(text + "\n* [[:" + Morebits.pageNameNorm + "]]--~~~~"); pageobj.setEditSummary("添加[[" + Morebits.pageNameNorm + "]]。" + Twinkle.getPref('summaryAd')); pageobj.setCreateOption('recreate'); 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=40371.
![]() ![]() 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.
|