“萌娘百科被屏蔽事件”与“Widget:TalkToc”:页面之间的差异

H萌娘,万物皆可H的百科全书!
(页面间差异)
跳到导航 跳到搜索
(文本替换 - 替换“hmoegirl.com”为“hmoegirl.info”)
 
(文本替换 - 替换“hmoegirl.com”为“hmoegirl.info”)
 
第1行: 第1行:
{{新 闻动态}}
<noinclude>Only for Talk</noinclude><includeonly><!--{if !isset($wgTalkToc) || !$wgTalkToc}--><!--{assign var="wgTalkToc" value=true scope="global"}--><script>
window.RLQ = window.RLQ || [];
window.RLQ.push(function() {
   if (location.hostname.includes("m.hmoegirl.info")) return;
   mw.loader.using(["oojs-ui"]).then(function() {
     if (!mw.config.get('talkTocLoaded', false)) {
       mw.config.set('talkTocLoaded', true);
       if (!$('#talkTocBox')[0]) {
         if (localStorage.getItem('widgetTalkToc') === 'disable') {
           $('body').addClass('widgetTalkTocDisable');
           $('.toctitle').after('<' + 'div style="text-align: center;">[<' + 'a class="enableWidgetTalkToc">启用讨论页面整理工具<' + '/a>]<' + '/div>');
           $('.enableWidgetTalkToc').on('click', function() {
             localStorage.setItem('widgetTalkToc', 'enable');
             $(this).text('启用成功!刷 页面中……');
             setTimeout(location.reload.bind(location), 150);
           });
           return;
         }


''' 萌娘百科被屏蔽事件''' ,是指萌娘百科在2017年10月23日被屏蔽的事件。
         $('body').addClass('widgetTalkTocEnable');
         var toclist = ['tocBox', 'talkTocBox', 'toc'],
           bgcolor = $('body').css('background-color'),
           $toc = $('#toc'),
           titlereg = {},
           $tocBox, $level2, $li, $svdDcs, $title, $toggle, $tocText,
           appendToggleButton;


== 经过==
         /* 预处理 */
北京时间​​2017年10月23日下午,即中共十九大期间,站长“晒太阳的冰”接到广州一个不愿意透露名称的政府部门电话,要求定点删除“毛泽东”等数个相关条目,并屏蔽相关敏感词,否则“会在24小时内通过腾讯云关停网站”。站长惊诧为何他在美国的电话号码会被人拿到。
         //备份目录
         $toc.after($toc.clone().hide().attr('id', 'tocClone'));
         //整理讨论串
         $('#mw-content-text > .mw-parser-output > h2').each(function() {
           var head = $(this);
           var container = $('<' + 'div/>');
           container.addClass('discussionContainer');
           head.addClass('discussionHead');
           head.before(container);
           head.nextUntil('h2').not('h2').appendTo(container);
           head.prependTo(container);
           if (container.find('.saveNotice')[0] && head.nextUntil(".saveNotice").length === 0) {
             $toc.find('a[href="#' + head.find('.mw-headline')[0].id.replace(/"/g, '\\\"') + '"]').parent().addClass("savedDiscussion hiddenDiscussion");
             container.addClass('savedDiscussion');
           } else if (window.CSS && CSS.supports && CSS.supports('position', 'sticky')) {
             head.css({
               position: 'sticky',
               top: 0,
               'background-color': bgcolor,
               'z-index': 2
             });
             container.css('position', 'relative');
           }
         });


{{Outer image|地址=https://www.hmoegirl.info/images/3/31/Http---n.sinaimg.cn-translate-20171024--CSc-fymzqpq3941787.jpg|title=|注释=站长接到政府部门电话|对齐=|宽度=px|高度=px}}
         // Temporary padding fix for Microsoft Edge
         // TODO: Report this issue to Edge team
         if (/Edge/.test(navigator.userAgent)) {
           $('.discussionContainer').css('padding-top', '10px');
         }


萌娘百科在大约15分钟内完成了对方所有要求,不过萌娘百科全部站点(除了H萌娘)突然无法访问,服务器也无法远程连接。
         //整理标题列表
         $toc.append("<" + "ol style='margin-left: 1.7em;'><" + "/ol>").after('<' + 'div id="tocBox"><' + '/div>');
         $toc.children('ul').children().appendTo($toc.find('ol'));
         $toc.find(".toclevel-1 > a > .tocnumber").remove();
         $toc.appendTo("#tocBox");


[[文件: 工信部查询截图.jpg|缩略图|该截图转载自新闻截图]]
         /* 定义变量 */
[[文件: 工信部截图 2020-02-22 14-18.png|缩略图|2020年2月22日在更改域名后的工信部查询平台上的查询结果]]
         $tocBox = $('#tocBox');
         $level2 = $toc.find('.toclevel-2').hide();
         $li = $toc.find('ol > li');
         $svdDcs = $toc.find('.savedDiscussion');
         $title = $toc.find('.toctitle').css("margin-right", "1em").append('<' + 'span id="toctoggle"><' + '/span>');
         $toggle = $title.append('<' + 'div id="toggle"><' + '/div>').find('#toggle');
         $tocText = $title.after('<' + 'div id="tocText"><' + '/div>').parents('#toc').find('#tocText');
         appendToggleButton = function($Obj, $set, shTx, hiTx, fun) {
           if (!$Obj[0]) return false;
           $set.append($('<' + 'a/>', {
             text: function() {
               if ($Obj.is(':visible')) return hiTx;
               else return shTx;
             },
             'class': 'toggleButton',
             href: 'javascript:void(0);',
             bind: {
               click: function() {
                 if ($Obj.is(':visible')) {
                   $Obj.hide();
                   $(this).text(shTx);
                 } else {
                   $Obj.show();
                   $(this).text(hiTx);
                 }
               }
             }
           }));
           if (typeof fun == 'function') fun();
         };


10月24日中午,萌娘百科主站网页服 依旧无法访问,且备案信息 注销、备案号 收回、域名moegirl.org 工业 信息化部列入违法互联网站黑名单。<ref>{{cite web|url=https://beian.miit.gov.cn/#/Integrated/Violations|title=ICP/IP地址/ 域名信息备案管理系统|quote=<br> 您查询的域名: moegirl.org <br> 原备案/许可证号为: 暂无<br> 已经列入黑名单<br> 黑名单管理相关文件请查询《关于建立境内违法互联网站黑名单管理制度的通知》(工信部联电管【2009】371号)|website=beian.muut.gov.cn|access-date=2021-07-22}}</ref>
         /* 业 处理*/
 
         //添加存档讨论串标题toggle按钮
当日晚上,萌娘百科主站逐渐恢复正常访问,域名解析重新迁移至境外的CloudFlare,但网页加载速度缓慢,其域名仍未从黑名单中移除。且手机版域名由m.moegirl.org移至mzh.moegirl.org,原域名无法访问(而此时通过百度搜索“萌娘百科”跳转的域名仍为m.moegirl.org,导致相当一段时间用户无法找到萌娘百科手机版域名)至今仍出现访问不稳定的情况。<ref>[http://news.yzz.cn/hyzx/201710-1218979.shtml 萌娘百科亡了?!昨日无法访问,今日域名被注销]'' 新浪网.2017-10-24''</ref>
         if ($svdDcs[0]) {
 
           $toggle.append($('<' + 'a/>', {
直到2020年7月19日萌娘百科才再次迁入中国大陆境内,并使用了新域名 zh.moegirl.org.cn 。<ref>{{cite web|url=https://zh.moegirl.org.cn/%E8%90%8C%E5%A8%98%E7%99%BE%E7%A7%91:%E5%85%AC%E5%91%8A/%E5%85%B3%E4%BA%8E%E8%90%8C%E5%A8%98%E7%99%BE%E7%A7%91%E5%88%87%E5%85%A5%E5%A2%83%E5%86%85%E7%9A%84%E5%91%8A%E7%9F%A5(2020.07.19) |title= 萌娘百科: 公告/ 关于萌娘百科切入境内 告知(2020.07.19)|work= 萌娘百科}}</ref>
             text: '显示已 存档标题',
 
             'class': 'toggleButton',
==流言==
             href: 'javascript:void(0);',
萌娘百科被屏蔽之后不久,一些网站就贴出了“萌娘百科因为有人恶意创建‘毛泽东’条目而被关停”的消息<ref>[https://www.sohu.com/a/201345220_523084 萌娘百科被列入中国大陆网站黑名单 萌娘平板姬走好].'' 搜狐.2017-10-31<br/> ''" 事情的真相其实也很简单,在这个大大大大大大大大大大大大大大大大大大大的时期,某些恶意编辑者故意编辑了违禁条目,然后恶意举报,导致网站一瞬间就被列入黑名单,而被恶意编辑的条目内容也是被我们成为“天魔传人”的伟大存在啊。"''</ref> ,配图却是H萌娘首页的截图,对应的条目创建历史实为用户向H萌娘搬运条目而产生。
             on: {
 
               click: function() {
<big>{{color|red| 在此再次澄清,萌娘百科被关停并非因为有人恶意创建条目,而是因为之前就已存在的敏感信息。}}</big>
                 if ($svdDcs.hasClass('hiddenDiscussion')) {
 
                   $svdDcs.removeClass('hiddenDiscussion');
{{ 政治}}
                   $(this).text('隐藏已被存档标题');
 
                 } else {
== 参考资料==
                   $svdDcs.addClass('hiddenDiscussion');
{{ 到维基百科|萌娘百科}}
                   $(this).text('显示已 存档标题');
<references />
                 }
 
               }
[[分类: 事件]]
             }
           }));
           $tocText.append("<" + "div class='tocText'>(有下划线标题是已 存档标题)<" + "/div>");
         }
         //添加二三四五级标题toggle按钮 标题数量
         appendToggleButton($level2, $toggle, '显示段落', '隐藏段落', function() {
           $tocText.append("<" + "div class='tocText'> (中括号内数字是该大段下小段数量)<" + "/div>");
           $toc.find('.toclevel-1').each(function() {
             var subtitleLength = $(this).find('.toctext').length - 1;
             if (subtitleLength) $(this).children('a').after('[' + subtitleLength + ']');
           });
         });
         // 添加整体toggle按钮
         appendToggleButton($toc.find('ol'), $title.find('#toctoggle'), '显示', '隐藏');
         $('#toc').addClass('noOrigin');
         /*
         $('.saveNotice').each(function() {
           $(this).prev('h2').addClass('savedNotice');
         });*/
         var containers = $('.discussionContainer');
         containers.first().before('<' + 'div id="talkTocBox"><' + 'table><' + '/table><' + '/div>');
         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) {
           if (i % 4 === 0) self.find('tbody:last').append('<' + 'tr/>');
           var that = $(this);
           /* var content = that.children().not('h2');
           content.find('a').each(function() {
             try {
               var href = $(this)[0].href;
               if (!href) return;
               var link = new mw.Uri(href);
               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 (!link.query.title && /\.php$/i.test(link.path)) this.userNameErrorReason = "!!(!link.query.title && /\\.php$/i.test(link.path))";
               else {
                 var t = link.query.title || decodeURIComponent(link.path.substring(1));
                 if (/^user([ _]talk)?:[^\/]+$/i.test(t)) $(this).data('userName', t.replace(/^user([ _]talk)?:/i, '')).addClass('userTalkPage');
                 else this.userNameErrorReason = "!!/^user([ _]talk)?:[^\\/]+$/i.test(t)";
               }
             } catch (e) {
               return;
             }
           });
           content.find('.userTalkPage').each(function() {
             var parent = $(this).closest(containers).clone();
             var now = Date.now() + (Math.random() + '').substring(2);
             parent.find('.userTalkPage').text(now);
             var regExec = RegExp(now + '(.*)(\\d{4}年([1-9]|1[0-2])月([1-9]|[12]\\d|3[01])日\\s{0,10}\\([一二三四五六日]\\)\\s{0,10}([01]\\d|2[0-3]):[0-5]\\d\\s{0,10}(\\([A-Z]{3}\\))?)').exec(parent.text());
             if (!regExec || regExec[1].length > 20) {
               this.userNameErrorReason = 'Too far away from timestamp (' + (regExec ? regExec[1].length : 'null') + ')';
               this.userNameErrorRegExec = regExec;
               $(this).removeClass('userTalkPage');
             } else $(this).data('userTalkTime', regExec[2]);
           });
           var userTalkPage = [];
           content.find('.userTalkPage').each(function() {
             var timestamp = $(this).data('userTalkTime').replace(/ \([A-Z]{3,4}\)$|\([日一二三四五六]\)/g, ''),
               date = new Date(),
               time = timestamp.split(/[年月日\s\(\)\:]+/).map(function(n) {
                 return +n;
               });
             if (!time || !time[4]) return $(this).removeClass('.userTalkPage')[0].userNameErrorReason = 'Error Timestamp(' + timestamp + ')';
             date.setFullYear(time[0]);
             date.setMonth(time[1] - 1);
             date.setDate(time[2]);
             date.setHours(time[3]);
             date.setMinutes(time[4]);
             userTalkPage.push([$(this).data('userName'), timestamp, date.getTime()]);
           });
           if (!userTalkPage[0]) userTalkPage.push(['Unsigned user/Nonstandard sign', 'Unknown Time']);
           else userTalkPage.sort(function(a, b) {
             return a[2] - b[2]
           });
           var firstName = userTalkPage[0],
             lastName = userTalkPage[userTalkPage.length - 1];
           titlereg[that.find('.mw-headline:first').attr('id')] = that;*/
           self.find('tr:last').append('<' + 'td><' + '/td>')
             .find('td:last').append(
               $('<' + 'a/>').attr('href', '#' + that.find('.mw-headline:first').attr('id').replace(/"/g, "&quot;")).append(that.find('.mw-headline:first').clone().find('a').replaceWith(function() {
                 return $(this).text();
               }).end().html())
             );
           /* .append(
             $('<' + 'div/>').addClass('signInfo').append('话题发起:' + (firstName[0] === 'Unsigned user/Nonstandard sign' ? 'Unsigned user/Nonstandard sign' : '<' + 'a href="/User_talk:' + firstName[0] + '" title="' + firstName[0] + '的讨论页" target="_blank">' + firstName[0].replace(/_/g, ' ') + '<' + '/a>'))
             .append('<' + 'br>最后回复:' + (lastName[0] === 'Unsigned user/Nonstandard sign' ? 'Unsigned user/Nonstandard sign' : '<' + 'a href="/User_talk:' + lastName[0] + '" title="' + lastName[0] + ' 讨论页" target="_blank">' + lastName[0].replace(/_/g, ' ') + '<' + '/a>') + '(' + lastName[1] + ')')
           ); */
         });
         /* if ($('.signInfo').filter(function() {
             return $(this).text().indexOf('Unsigned user/Nonstandard sign') !== -1;
           }).length * 2 > $('.signInfo').length) $('.signInfo').hide(); */
         self.append('<' + 'tbody class="hr"><' + 'tr><' + 'td colspan="4"> <' + '/td><' + '/tr><' + '/tbody>').append('<' + 'tbody/>').find('tbody').not(':first').hide();
         containers.filter('.savedDiscussion').each(function(i) {
           if (i % 4 === 0) self.find('tbody:last').append('<' + 'tr/>');
           self.find('tr:last').append('<' + 'td><' + 'a class="savedTitle" href="#' + $(this).find('.mw-headline:first').attr('id').replace(/"/g, "&quot;") + '">' + $(this).clone().find('.mw-headline:first').children('.mw-headline-number').remove().end().prepend(containers.index(this) + 1 + ' ').text() + '<' + '/a><' + '/td>');
         });
         a.on('click', function() {
           self.find('tbody').not(':first').fadeToggle();
           $(this).text($(this).text() === '显示已存档讨论串标题' ? '隐藏已存档讨论串标题' : '显示已存档讨论串标题');
         });
         self.find('tbody').not('.hr').each(function() {
           var that = $(this).find('tr:last');
           that.append(("<" + "td>&#32;<" + "/td>").repeat(4 - that.find("td").length));
         });
         $('#talkTocBox caption').append('').append($('<' + 'a/>').addClass('cbutton')).append('');
         $('#tocText').append('<' + 'br>').append($('<' + 'a/>').addClass('cbutton')).append('');
         $('.cbutton').on('click', function() {
           if (!localStorage.wgTocStyle || localStorage.wgTocStyle !== 'list') {
             $('#talkTocBox').hide();
             $('#tocBox').show();
             localStorage.setItem('wgTocStyle', 'list');
             $('.cbutton').text('');
             $(toclist.filter(function(l) {
               return l !== "tocBox";
             }).map(function(l) {
               return 'a[href="#' + l + '"';
             }).join(', ')).attr("href", "#tocBox");
           } else {
             $('#talkTocBox').show();
             $('#tocBox').hide();
             localStorage.setItem('wgTocStyle', 'table');
             $('.cbutton').text('');
             $(toclist.filter(function(l) {
               return l !== "talkTocBox";
             }).map(function(l) {
               return 'a[href="#' + l + '"';
             }).join(', ')).attr("href", "#talkTocBox");
           }
         });
         if (!localStorage.wgTocStyle || localStorage.wgTocStyle !== 'list') {
           $('#talkTocBox').show();
           $('.cbutton').text('');
           $(toclist.filter(function(l) {
             return l !== "talkTocBox";
           }).map(function(l) {
             return 'a[href="#' + l + '"';
           }).join(', ')).attr("href", "#talkTocBox");
         } else {
           $('#tocBox').show();
           $('.cbutton').text('');
           $(toclist.filter(function(l) {
             return l !== "tocBox";
           }).map(function(l) {
             return 'a[href="#' + l + '"';
           }).join(', ')).attr("href", "#tocBox");
         }
         $tocBox.css({
           position: 'relative',
           'z-index': 10
         });
         $(window).on('hashchange', function(e) {
           try {
             var hash = location.hash.substring(1);
             var target = $('[id="' + decodeURIComponent(hash).replace(/"/g, '\\\"') + '"]');
             if (target[0]) {
               var scrollTop = target.offset().top;
               if (target.closest('.discussionHead').length === 0) {
                 var parent = target.closest('h1, h2, h3, h4, h5, h6');
                 if (parent.length > 0) {
                   scrollTop -= parent.outerHeight(true) - parent.height();
                   var h = parent.prevAll('h1, h2, h3, h4, h5, h6').filter(function() {
                     return $(this).css('position') === 'sticky';
                   });
                   if (h.length > 0) scrollTop -= h.outerHeight();
                 }
               } else scrollTop = target.closest('.discussionContainer').offset().top;
               setTimeout(function() {
                 $('html,body').animate({
                   scrollTop: scrollTop
                 }, 0);
               }, 1);
               return false;
             }
           } catch (e) {
             return;
           }
         }).trigger('hashchange');
         const g = ["sysop", "patroller"];
       }
     }
   });
});
</script><style>
/* <pre> */
@media screen and (min-width: 600px) {
body {
   opacity: 0.95;
   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;
}
}
#ca-nstab-project {  
display: none;
}
.widgetTalkTocEnable #tocBox {
   max-width: 37%;
   min-width: 300px;
   float: left;
}
.widgetTalkTocEnable #toc.noOrigin {
   display: table;
}
.widgetTalkTocEnable div.toc#toc:not(.toc-custom) {
   min-width: 300px;
   box-sizing: border-box;
   margin-right: 37px;
   padding-right: 1em;
   padding-left: 1em;
}
.widgetTalkTocEnable div.toc#toc div.toctitle h2 {
   margin-right: 1em;
}
.widgetTalkTocEnable div.toc.noOrigin#toc .toctoggle {
   display: none;
}
.widgetTalkTocEnable div#toc.toc #toctoggle,
.widgetTalkTocEnable div#toc.toc #toggle {
   font-size: 94%;
   -webkit-user-select: none;
   -ms-user-select: none;
   -o-user-select: none;
   -moz-user-select: none;
   user-select: none;
}
.widgetTalkTocEnable div#toc.toc .toggleButton:before {
   content: "[";
   color: black;
}
.widgetTalkTocEnable div#toc.toc .toggleButton:after {
   content: "]";
   color: black;
}
.widgetTalkTocEnable #toc .toggleButton:first-child {
   margin-right: 0.5em;
}
.widgetTalkTocEnable div#toc.toc .toggleButton:last-child {
   margin-right: 0;
}
.widgetTalkTocEnable div#toc.toc .hiddenDiscussion {
   visibility: hidden;
   height: 0;
   margin: 0;
}
.widgetTalkTocEnable div.toc#toc li.savedDiscussion a {
   text-decoration: underline;
}
.widgetTalkTocEnable #toc div#tocText {
   text-align: center;
}
.widgetTalkTocEnable #toc div.tocText {
   display: inline-block;
}
#toc:not(.toc-custom),
#tocBox,
#talkTocBox {
   display: none;
}
.widgetTalkTocDisable #toc:not(.toc-custom) {
   display: table;
}
.widgetTalkTocEnable #talkTocBox td {
   text-align: center;
   border: 1px solid #a7d7f9;
   width: 25%;
   padding: 0 1em;
}
.widgetTalkTocEnable #talkTocBox .hr td {
   width: 100%;
}
.widgetTalkTocEnable #talkTocBox table {
   border-collapse: collapse;
   margin-bottom: 1em;
   width: 100%;
}
.widgetTalkTocEnable #talkTocBox a {
   cursor: pointer;
}
.widgetTalkTocEnable #talkTocBox .savedTitle {
   text-decoration: underline;
}
.widgetTalkTocEnable .cbutton {
   cursor: pointer;
}
#ca-edit, #ca-editTopSection .mw-editsection {
   display: none !important;
}
.signInfo {
   display: none !important;
}
#right-navigation.no-need-to-edit-whole-page ul {
   display: flex;
}
#right-navigation.no-need-to-edit-whole-page ul>li {
   order: 999;
}
#right-navigation.no-need-to-edit-whole-page ul>li#ca-view {
   order: 1;
}
#right-navigation.no-need-to-edit-whole-page ul>li#ca-no-need-to-edit-whole-page-notice {
   order: 2;
   font-style: italic;
}
#right-navigation.no-need-to-edit-whole-page ul>li#ca-no-need-to-edit-whole-page-notice a,
#right-navigation.no-need-to-edit-whole-page ul>li#ca-no-need-to-edit-whole-page-notice a:visited {
   color: #222;
   text-decoration: none;
}
#right-navigation.no-need-to-edit-whole-page ul>li#Wikiplus-Edit-TopBtn,
#right-navigation.no-need-to-edit-whole-page ul>li#ca-edit,
#right-navigation.no-need-to-edit-whole-page ul>li#ca-editTopSection{
   display: none;
}
.cloaked-element.transparent-shield {
   z-index: 9999999;
}
.navpopup {
   z-index: 1000000;
}
/* </pre> */
</style><!--{/if}--></includeonly>

2022年11月20日 (日) 15:03的版本

Only for Talk