User:Irukaza/common.js:修订间差异
跳到导航
跳到搜索
imported>=海豚= 无编辑摘要 |
imported>=海豚= (以“→global mediaWiki: (function(mw) { if (!String.prototype.includes) String.prototype.includes = function includes(search, start) { 'use strict'; if (ty…”替换内容) |
||
第21行: | 第21行: | ||
}); | }); | ||
}; | }; | ||
2020年3月29日 (日) 19:36的版本
/* global mediaWiki */
(function(mw) {
if (!String.prototype.includes) String.prototype.includes = function includes(search, start) {
'use strict';
if (typeof start !== 'number') start = 0;
if (start + search.length > this.length) return false;
return this.indexOf(search, start) !== -1;
};
mw.loader.implement('AnnToolsSendWelcomeMessage', function() {
var message = '{{Welcome}}',
errorFun = function errorFun(_, self) {
unbindFun();
self.addClass('unsend');
return false;
},
unbindFun = function unbindFun() {
if ($('#welcomeClear').length > 0) $('#welcomeClear').remove();
$('#welcomeAsk').append('<span id="welcomeClear">返回</span>');
$('#welcomeClear').on('click.welcome', function() {
$('#welcomeAsk').remove();
});
};