Widget:TalkToc:修订间差异
跳到导航
跳到搜索
imported>=海豚= 无编辑摘要 |
标签:回退 |
||
(未显示4个用户的11个中间版本) | |||
第1行: | 第1行: | ||
<noinclude>Only for | <noinclude>Only for Talk</noinclude><includeonly><!--{if !isset($wgTalkToc) || !$wgTalkToc}--><!--{assign var="wgTalkToc" value=true scope="global"}--><script> | ||
window. | window.addEventListener('jquery-ready', function() { | ||
if (location.hostname.includes("m.hmoegirl.info")) return; | |||
if (location.hostname.includes("m.hmoegirl. | |||
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)) { | ||
第135行: | 第134行: | ||
containers.first().before('<' + 'div id="talkTocBox"><' + 'table><' + '/table><' + '/div>'); | containers.first().before('<' + 'div id="talkTocBox"><' + 'table><' + '/table><' + '/div>'); | ||
var self = $('#talkTocBox table'), | var self = $('#talkTocBox table'), | ||
a = $('<' + 'a/>').text(''); | |||
self.append('<' + 'caption/>').find('caption').append('<br/>').append('').append(a).append('') | |||
.end().append('<' + 'tbody/>'); | |||
containers.not('.savedDiscussion').each(function(i) { | containers.not('.savedDiscussion').each(function(i) { | ||
if (i % 4 === 0) self.find('tbody:last').append('<' + 'tr/>'); | if (i % 4 === 0) self.find('tbody:last').append('<' + 'tr/>'); | ||
第144行: | 第146行: | ||
if (!href) return; | if (!href) return; | ||
var link = new mw.Uri(href); | var link = new mw.Uri(href); | ||
if (link.host !== 'www. | if (link.host !== 'www.moegirl.com') this.userNameErrorReason = "link.host !== 'www.moegirl.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))"; | ||
第258行: | 第260行: | ||
}).join(', ')).attr("href", "#tocBox"); | }).join(', ')).attr("href", "#tocBox"); | ||
} | } | ||
$tocBox.css({ | $tocBox.css({ | ||
position: 'relative', | position: 'relative', | ||
第302行: | 第298行: | ||
</script><style> | </script><style> | ||
/* <pre> */ | /* <pre> */ | ||
@media screen and (min-width: 600px) { | |||
body { | body { | ||
opacity: 0. | opacity: 0.95; | ||
background-image:url(https://www.hmoegirl. | background-image:url(https://www.hmoegirl.info/images/a/af/%E8%AE%A8%E8%AE%BA%E7%89%88%E8%AF%8D%E4%BA%91.jpg); | ||
background-repeat:no-repeat; | background-repeat:no-repeat; | ||
} | |||
} | } | ||
#ca-nstab-project { | #ca-nstab-project { | ||
第367行: | 第365行: | ||
.widgetTalkTocEnable #toc div.tocText { | .widgetTalkTocEnable #toc div.tocText { | ||
display: inline-block; | display: inline-block; | ||
} | } | ||
#toc:not(.toc-custom), | #toc:not(.toc-custom), |
2023年8月18日 (五) 10:14的最新版本
Only for Talk