MediaWiki:Group-sysop.js:修订间差异
MediaWiki界面页面
更多操作
无编辑摘要 |
无编辑摘要 |
||
| 第29行: | 第29行: | ||
if (!$(that).is('#mw-content-text a.new')) return; | if (!$(that).is('#mw-content-text a.new')) return; | ||
if (!/(?=title\=用户讨论\:)[^\&]+/i.test(decodeURI(that.href))) return; | if (!/(?=title\=用户讨论\:)[^\&]+/i.test(decodeURI(that.href))) return; | ||
var self = $(that), | try { | ||
var self = $(that), | |||
href = self.attr('href'), | |||
if (href.includes(' | userName = decodeURI(href).match(/(?=用户讨论\:)[^\&]+/i)[0].replace(/用户讨论\:/i, ''); | ||
} catch (e) { | |||
return; | |||
} | |||
if (href.includes('用户讨论') && href.includes('redlink=1') && href.includes('action=edit') && !userName.includes('/')) { | |||
self.addClass('sendWelcomeMessageLink unsend nopopus').on('click.sendWelcomeMessage', function() { | self.addClass('sendWelcomeMessageLink unsend nopopus').on('click.sendWelcomeMessage', function() { | ||
if ($('#welcomeAskFinished')[0]) $('#welcomeClear').click(); | if ($('#welcomeAskFinished')[0]) $('#welcomeClear').click(); | ||