Widget:TalkToc:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
imported>=海豚=
无编辑摘要
imported>=海豚=
(恢复=海豚=讨论)的编辑至Hice的最后版本)
第1行: 第1行:
<noinclude>Only for [[Talk:讨论版]] & [[Talk:提问求助区]]</noinclude><includeonly><!--{if !isset($wgTalkToc) || !$wgTalkToc}--><!--{assign var="wgTalkToc" value=true scope="global"}--><script>
<noinclude> </noinclude><includeonly><!--{if !isset($wgTalkToc) || !$wgTalkToc}--><!--{assign var="wgTalkToc" value=true scope="global"}--><script>
window.RLQ = window.RLQ || [];
window.RLQ = window.RLQ || [];
window.RLQ.push(function() {
window.RLQ.push(function() {
    if (location.hostname.includes("mzh.moegirl.org")) return;
    mw.hook('wikipage.content').add(function() {
   mw.loader.using(["oojs-ui"]).then(function() {
      if (!mw.config.get('talkTocLoaded')) {
      if (!mw.config.get('talkTocLoaded', false)) {
        mw.config.set('talkTocLoaded', window.setInterval(function() {
        mw.config.set('talkTocLoaded', true);
          if (mw.config.get('talkTocStop')) return;
       if (!$('#talkTocBox')[0]) {
         if (!$('#talkTocBox')[0]) {
          if (localStorage.getItem('widgetTalkToc') === 'disable') {
            console.debug('widgetTalkToc', 'initing');
           $('body').addClass('widgetTalkTocDisable');
            var $toc = $('#toc'),
           $('.toctitle').after('<' + 'div style="text-align: center;">[<' + 'a class="enableWidgetTalkToc">启用讨论页面整理工具<' + '/a>]<' + '/div>');
             $tocBox, $level2, $li, $svdDcs, $title, $toggle, $tocText,
            $('.enableWidgetTalkToc').on('click', function() {
             appendToggleButton;
             localStorage.setItem('widgetTalkToc', 'enable');
             $(this).text('启用成功!刷新页面中……');
             setTimeout(location.reload.bind(location), 150);
           });
            return;
         }
 
         $('body').addClass('widgetTalkTocEnable');
         var toclist = ['tocBox', 'talkTocBox', 'toc'],
           bgcolor = $('body').css('background-color'),
           $toc = $('#toc'),
           titlereg = {},
           $tocBox, $level2, $li, $svdDcs, $title, $toggle, $tocText,
           appendToggleButton;


            /* 预处理 */
            /* 预处理 */

2020年3月25日 (三) 12:09的版本