「User:Irukaza/common.js」:修訂間差異
跳至導覽
跳至搜尋
[InPageEdit] 没有编辑摘要
imported>=海豚= ([InPageEdit] 没有编辑摘要) |
imported>=海豚= ([InPageEdit] 没有编辑摘要) |
||
| 第25行: | 第25行: | ||
function check(that, onClick) { | function check(that, onClick) { | ||
if (!$(that).is('#mw-content-text a.new')) return; | if (!$(that).is('#mw-content-text a.new')) return; | ||
if (!/(?=title\= | if (!/(?=title\= 用户\_讨论\:)[^\&]+/i.test(that.href)) return; | ||
var self = $(that), | var self = $(that), | ||
href = self.attr('href'), | href = self.attr('href'), | ||
userName = decodeURIComponent(href.match(/(?= | userName = decodeURIComponent(href.match(/(?= 用户\_讨论\:)[^\&]+/i)[0].replace(/用户讨论\:/i, '')); | ||
if (href.includes('用户讨论') && href.includes('redlink=1') && href.includes('action=edit') && !userName.includes('/')) { | 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() { | ||