Widget:TalkToc:修订间差异
跳到导航
跳到搜索
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
第2行: | 第2行: | ||
window.RLQ = window.RLQ || []; | window.RLQ = window.RLQ || []; | ||
window.RLQ.push(function() { | window.RLQ.push(function() { | ||
if (location.hostname.includes(" | if (location.hostname.includes("m.hmoegirl.com")) return; | ||
mw.loader.using(["oojs-ui"]).then(function() { | mw.loader.using(["oojs-ui"]).then(function() { | ||
if (!mw.config.get('talkTocLoaded', false)) { | if (!mw.config.get('talkTocLoaded', false)) { | ||
第97行: | 第97行: | ||
/* 业务处理*/ | /* 业务处理*/ | ||
//添加二三四五级标题toggle按钮和标题数量 | //添加二三四五级标题toggle按钮和标题数量 | ||
appendToggleButton($level2, $toggle, '显示段落', '隐藏段落', function() { | appendToggleButton($level2, $toggle, '显示段落', '隐藏段落', function() { | ||
第147行: | 第128行: | ||
if (!href) return; | if (!href) return; | ||
var link = new mw.Uri(href); | var link = new mw.Uri(href); | ||
if (link.host !== ' | if (link.host !== 'www.hmoegirl.com') this.userNameErrorReason = "link.host !== 'www.hmoegirl.com'"; | ||
else if (/^\/api\.php/i.test(link.path)) this.userNameErrorReason = "!!/^\\/api\\.php/i.test(link.path)"; | else if (/^\/api\.php/i.test(link.path)) this.userNameErrorReason = "!!/^\\/api\\.php/i.test(link.path)"; | ||
else if (!link.query.title && /\.php$/i.test(link.path)) this.userNameErrorReason = "!!(!link.query.title && /\\.php$/i.test(link.path))"; | else if (!link.query.title && /\.php$/i.test(link.path)) this.userNameErrorReason = "!!(!link.query.title && /\\.php$/i.test(link.path))"; |
2020年3月25日 (三) 11:16的版本
Only for Talk:讨论版 & Talk:提问求助区