diff --git a/JapaneseFilter/sections/antiadblock.txt b/JapaneseFilter/sections/antiadblock.txt index 13981bba768..248e863d254 100644 --- a/JapaneseFilter/sections/antiadblock.txt +++ b/JapaneseFilter/sections/antiadblock.txt @@ -27,7 +27,7 @@ mytry.jp#@#.ad_box mytry.jp#$#body > #container { display: block !important; } ! https://github.com/AdguardTeam/AdguardFilters/issues/190943 wiki.yjsnpi.nu#%#//scriptlet('trusted-set-constant', 'RLPAGEMODULES', '["site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","mmv.head","mmv.bootstrap.autostart","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.checkUser.clientHints"]') -wiki.yjsnpi.nu#%#//scriptlet('prevent-eval-if', '\d\([-\d]+\,[-\d]+/') +wiki.yjsnpi.nu#%#//scriptlet('prevent-eval-if', '\d\([-\d]+,[-\d]+/') wiki.yjsnpi.nu#%#const shuffleArray=e=>e.sort((()=>Math.random()-Math.random()));function fetchComments(e){const t=new XMLHttpRequest;let n;t.onreadystatechange=()=>{4===t.readyState&&200===t.status&&(n=JSON.parse(t.responseText),renderComments(n))},t.open("GET","/comments/comments.php?article_id="+RLCONF.wgArticleId+"&cursor="+e,!0),t.send()}function fetchMore(e){fetchComments(e.target.dataset.cursor)}function renderComments(e){const t=document.querySelector("#comments"),n=document.querySelector("#comments-contents"),o=document.querySelector("#comments-loading"),c=document.querySelector("#comments-more"),m=document.querySelector("#comments-recent");if(o&&o.remove(),c&&c.remove(),e.comments.forEach((e=>{const n=window.comments.template.querySelector("#comment").cloneNode(!0);n.id="comment-"+e.number,n.dataset.commentId=e.comment_id,n.querySelector(".comment-author").innerHTML=e.author,n.querySelector(".comment-timestamp").innerHTML=e.created_at,n.querySelector(".comment-body").innerHTML=e.comment,t.appendChild(n)})),e.cursor>0){const t=window.comments.template.querySelector("#comments-more").cloneNode(!0);t.dataset.cursor=e.cursor,t.addEventListener("click",fetchMore),n.appendChild(t)}const r=document.createElement("ul");e.recent=shuffleArray(e.recent),e.recent.forEach((e=>{const t=document.createElement("li"),n=document.createElement("a");n.href="/w/index.php?curid="+e.article_id,e.comment.length>70&&(e.comment=e.comment.substring(0,70)+"…"),n.innerHTML=e.comment,t.appendChild(n),r.appendChild(t)})),m.appendChild(r.cloneNode(!0)),m.appendChild(r.cloneNode(!0)),"#comments-section"==location.hash&&(location.hash="",location.hash="#comments-section")}function submitComment(e){const t=document.querySelector('#comment-editor input[name="author"]'),n=document.querySelector("#comment-editor textarea");if(""==n.value)return void mw.notify("(本文が)ないです");e.target.disabled=!0,e.target.innerHTML="送信中…";const o={article_id:RLCONF.wgArticleId,author:t.value,comment:n.value},c=[];for(const[e,t]of Object.entries(o))c.push(`${encodeURIComponent(e)}=${encodeURIComponent(t)}`);const m=new XMLHttpRequest;m.onreadystatechange=()=>{4===m.readyState&&(e.target.disabled=!1,e.target.innerHTML="投稿する",200===m.status?(mw.notify("投稿しました"),t.value="",n.value="",document.querySelector("#comments").innerHTML="",document.querySelector("#comments-recent").innerHTML="",setTimeout((()=>{fetchComments(0)}),"100")):403===m.status?mw.notify("(フリーWi-Fiからは書け)ないです"):429===m.status?mw.notify("書きすぎィ!ちょっと待って、どうぞ!"):mw.notify("投稿できませんでした…"))},m.open("POST","/comments/comments.php"),m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.send(c.join("&").replace(/%20/g,"+"))}window.addEventListener("load",(()=>{if(0==RLCONF.wgNamespaceNumber&&"view"==RLCONF.wgAction&&0!=RLCONF.wgArticleId&&!RLCONF.wgIsRedirect&&RLCONF.wgRevisionId==RLCONF.wgCurRevisionId){"#comments-section"==location.hash&&window.scroll(0,document.documentElement.scrollHeight-document.documentElement.clientHeight),window.comments={};const e=new XMLHttpRequest;e.onreadystatechange=()=>{4===e.readyState&&200===e.status&&(window.comments.template=(new DOMParser).parseFromString(e.responseText,"text/html").body,document.querySelector("#bodyContent").appendChild(window.comments.template.querySelector("#comments-section")),document.querySelector("#comment-submit").addEventListener("click",submitComment),fetchComments(0))},e.open("GET","/comments/template.html",!0),e.send()}}));mw.loader.impl((function(){return["mediawiki.page.ready@1mbf4",{main:"ready.js",files:{"ready.js":function(e,t,n){var o=e("./checkboxShift.js"),i=e("./config.json"),a=e("./teleportTarget.js");function r(e){var t=!!("mediawiki.searchSuggest"===e&&"vector"===mw.config.get("skin")&&window.performance&&performance.mark&&performance.measure&&performance.getEntriesByName);function n(){t&&performance.mark("mwVectorLegacySearchLoadStart"),mw.loader.using(e,(function(){t&&performance.getEntriesByName("mwVectorLegacySearchLoadStart").length&&(performance.mark("mwVectorLegacySearchLoadEnd"),performance.measure("mwVectorLegacySearchLoadStartToLoadEnd","mwVectorLegacySearchLoadStart","mwVectorLegacySearchLoadEnd"))}))}!document.activeElement||"searchInput"!==document.activeElement.id&&!document.activeElement.classList.contains("mw-searchInput")?document.addEventListener("focusin",(function e(t){("searchInput"===t.target.id||t.target.classList.contains("mw-searchInput"))&&(n(),document.removeEventListener("focusin",e))})):n()}mw.config.get("wgBreakFrames")&&window.top!==window.self&&(window.top.location.href=location.href),mw.hook("wikipage.content").add((function(e){var t,n,a=[];i.collapsible&&(t=e.find(".mw-collapsible")).length&&a.push("jquery.makeCollapsible"),i.sortable&&(n=e.find("table.sortable")).length&&a.push("jquery.tablesorter"),a.length&&mw.loader.using(a).then((function(){n&&n.length&&n.tablesorter(),t&&t.length&&t.makeCollapsible()})),e[0]&&!1===e[0].isConnected&&mw.log.warn("wikipage.content hook should not be fired on unattached content"),o(e.find('input[type="checkbox"]:not(.noshiftselect)'))})),e("./toggleAllCollapsibles.js"),$((function(){$("[accesskey]").updateTooltipAccessKeys();var e=document.querySelector(".mw-indicators");e&&e.children.length&&mw.hook("wikipage.indicators").fire($(e.children));var t=$("#mw-content-text");t.length&&mw.hook("wikipage.content").fire(t);var n=$('.catlinks[data-mw="interface"]');n.length&&mw.hook("wikipage.categories").fire(n),(n=$('table.diff[data-mw="interface"]')).length&&mw.hook("wikipage.diff").fire(n.eq(0)),$("#t-print a").on("click",(function(e){window.print(),e.preventDefault()}));var o,r,c,l=$("#t-permalink a");function d(){mw.util.getTargetFromFragment()?l[0].hash=location.hash:l[0].hash=""}l.length&&($(window).on("hashchange",d),d()),mw.hook("skin.logout").add((function(e){mw.notify(mw.message("logging-out-notify"),{tag:"logout",autoHide:!1});var t=new mw.Api;t.postWithToken("csrf",{action:"logout"}).then((function(){location.href=e}),(function(e,n){mw.notify(t.getErrorMessage(n),{type:"error",tag:"logout",autoHide:!1})}))})),$(i.selectorLogoutLink).on("click",(function(e){mw.hook("skin.logout").fire(this.href),e.preventDefault()})),o=$("meta[name=viewport]"),r=o.attr("content"),c=window.outerWidth/window.innerWidth,window.innerWidth>=720&&window.innerWidth<=1e3&&r&&-1===r.indexOf("initial-scale")&&o.attr("content","width=1000,initial-scale="+c),a.attach()})),i.search&&r("mediawiki.searchSuggest");try{sessionStorage.getItem("mw-PostEdit"+mw.config.get("wgPageName"))&&mw.loader.load("mediawiki.action.view.postEdit")}catch(e){}t.exports={loadSearchModule:r,checkboxHack:e("./checkboxHack.js"),teleportTarget:a.target}},"checkboxShift.js":function(e,t,n){t.exports=function(e){var t;e.on("click",(function(n){t&&n.shiftKey&&e.slice(Math.min(e.index(t),e.index(n.target)),Math.max(e.index(t),e.index(n.target))+1).filter((function(){return!this.disabled&&this.checked!==n.target.checked})).prop("checked",n.target.checked).trigger("change"),t=n.target}))}},"checkboxHack.js":function(e,t,n){function o(e,t){if(t)return mw.log.warn("[1.38] The button parameter in updateAriaExpanded is deprecated, aria-expanded will be applied to the checkbox going forward. View the updated checkbox hack documentation for more details."),void t.setAttribute("aria-expanded",e.checked.toString());e.setAttribute("aria-expanded",e.checked.toString())}function i(e,t){var n;if(e.checked=t,"function"==typeof Event)n=new Event("input",{bubbles:!0,composed:!0});else{if(!(n=document.createEvent("CustomEvent")))return;n.initCustomEvent("input",!0,!1,!1)}e.dispatchEvent(n)}function a(e,t,n,o){!e.checked||o.target instanceof Node&&(e.contains(o.target)||t.contains(o.target)||n.contains(o.target))||i(e,!1)}function r(e,t){t&&mw.log.warn("[1.38] The button parameter in bindUpdateAriaExpandedOnInput is deprecated, aria-expanded will be applied to the checkbox going forward. View the updated checkbox hack documentation for more details.");var n=o.bind(void 0,e,t);return e.addEventListener("input",n),function(){e.removeEventListener("input",n)}}function c(e,t){function n(t){t.preventDefault(),i(e,!e.checked)}return t.addEventListener("click",n,!0),function(){t.removeEventListener("click",n,!0)}}function l(e){function t(t){"Enter"===t.key&&i(e,!e.checked)}return e.addEventListener("keyup",t),function(){e.removeEventListener("keyup",t)}}function d(e,t,n,o){var i=a.bind(void 0,t,n,o);return e.addEventListener("click",i,!0),function(){e.removeEventListener("click",i,!0)}}function s(e,t,n,o){var i=a.bind(void 0,t,n,o);return e.addEventListener("focusin",i,!0),function(){e.removeEventListener("focusin",i,!0)}}function u(e,t){function n(t){t.target&&t.target.parentNode&&("A"===t.target.nodeName||"A"===t.target.parentNode.nodeName)&&i(e,!1)}return t.addEventListener("click",n),function(){t.removeEventListener("click",n)}}t.exports={updateAriaExpanded:o,bindUpdateAriaExpandedOnInput:r,bindToggleOnClick:c,bindToggleOnSpaceEnter:function(e,t){function n(e){" "!==e.key&&"Enter"!==e.key||e.preventDefault()}function o(e){" "!==e.key&&"Enter"!==e.key||t.click()}return mw.log.warn("[1.38] bindToggleOnSpaceEnter is deprecated. Use `bindToggleOnEnter` instead."),t.addEventListener("keydown",n),t.addEventListener("keyup",o),function(){t.removeEventListener("keydown",n),t.removeEventListener("keyup",o)}},bindToggleOnEnter:l,bindDismissOnClickOutside:d,bindDismissOnFocusLoss:s,bindDismissOnClickLink:u,bind:function(e,t,n,o){var i=[r(t),c(t,n),l(t),d(e,t,n,o),s(e,t,n,o),u(t,o)];return function(){i.forEach((function(e){e()}))}}}},"teleportTarget.js":function(e,t,n){const o=document.createElement("div");o.id="mw-teleport-target",t.exports={target:o,attach(){document.body.appendChild(o)}}},"toggleAllCollapsibles.js":function(e,t,n){let o;mw.hook("wikipage.content").add((function(){if(o)return;if(!document.querySelector("#mw-content-text .mw-parser-output .mw-collapsible"))return;const e=mw.util.addPortletLink("p-tb","#",mw.msg("collapsible-expand-all-text"),"t-collapsible-toggle-all",mw.msg("collapsible-expand-all-tooltip"));if(!e)return;o=e.querySelector("a"),o.setAttribute("role","button"),o.setAttribute("aria-expanded","false");let t=!1;o.addEventListener("click",(function(e){if(e.preventDefault(),t){const e=document.querySelectorAll("#mw-content-text .mw-parser-output .mw-made-collapsible:not( .mw-collapsed )");Array.prototype.forEach.call(e,(function(e){$(e).data("mw-collapsible").collapse()})),o.textContent=mw.msg("collapsible-expand-all-text"),o.title=mw.msg("collapsible-expand-all-tooltip"),o.setAttribute("aria-expanded","false"),t=!1}else{const e=document.querySelectorAll("#mw-content-text .mw-parser-output .mw-made-collapsible.mw-collapsed");Array.prototype.forEach.call(e,(function(e){$(e).data("mw-collapsible").expand()})),o.textContent=mw.msg("collapsible-collapse-all-text"),o.title=mw.msg("collapsible-collapse-all-tooltip"),o.setAttribute("aria-expanded","true"),t=!0}}))}))},"config.json":{search:!1,collapsible:!0,sortable:!0,selectorLogoutLink:'#pt-logout a[data-mw="interface"]'}}},{css:["#mw-teleport-target{position:absolute;z-index:450}"]},{"collapsible-collapse-all-text":"すべて折り畳む","collapsible-collapse-all-tooltip":"現在のページ上にある折り畳み可能な要素をすべて折り畳む","collapsible-expand-all-text":"すべて開く","collapsible-expand-all-tooltip":"現在のページ上にある折り畳み可能な要素をすべて開く","logging-out-notify":"ログアウト中です。お待ちください。"}]})); !#if (!adguard_app_ios && !adguard_ext_android_cb && !adguard_ext_firefox && !ext_ublock) ||wiki.yjsnpi.nu^$script diff --git a/QuickFixesFilter/sections/quickfixes.txt b/QuickFixesFilter/sections/quickfixes.txt index 776bf546256..67536110b58 100644 --- a/QuickFixesFilter/sections/quickfixes.txt +++ b/QuickFixesFilter/sections/quickfixes.txt @@ -381,7 +381,7 @@ vibefm.pl##.article__placement ! NOTE: Frequently updated sites ! ! https://github.com/AdguardTeam/AdguardFilters/issues/190943 -wiki.yjsnpi.nu#%#//scriptlet('prevent-eval-if', '\d\([-\d]+\,[-\d]+/') +wiki.yjsnpi.nu#%#//scriptlet('prevent-eval-if', '\d\([-\d]+,[-\d]+/') wiki.yjsnpi.nu#%#const shuffleArray=e=>e.sort((()=>Math.random()-Math.random()));function fetchComments(e){const t=new XMLHttpRequest;let n;t.onreadystatechange=()=>{4===t.readyState&&200===t.status&&(n=JSON.parse(t.responseText),renderComments(n))},t.open("GET","/comments/comments.php?article_id="+RLCONF.wgArticleId+"&cursor="+e,!0),t.send()}function fetchMore(e){fetchComments(e.target.dataset.cursor)}function renderComments(e){const t=document.querySelector("#comments"),n=document.querySelector("#comments-contents"),o=document.querySelector("#comments-loading"),c=document.querySelector("#comments-more"),m=document.querySelector("#comments-recent");if(o&&o.remove(),c&&c.remove(),e.comments.forEach((e=>{const n=window.comments.template.querySelector("#comment").cloneNode(!0);n.id="comment-"+e.number,n.dataset.commentId=e.comment_id,n.querySelector(".comment-author").innerHTML=e.author,n.querySelector(".comment-timestamp").innerHTML=e.created_at,n.querySelector(".comment-body").innerHTML=e.comment,t.appendChild(n)})),e.cursor>0){const t=window.comments.template.querySelector("#comments-more").cloneNode(!0);t.dataset.cursor=e.cursor,t.addEventListener("click",fetchMore),n.appendChild(t)}const r=document.createElement("ul");e.recent=shuffleArray(e.recent),e.recent.forEach((e=>{const t=document.createElement("li"),n=document.createElement("a");n.href="/w/index.php?curid="+e.article_id,e.comment.length>70&&(e.comment=e.comment.substring(0,70)+"…"),n.innerHTML=e.comment,t.appendChild(n),r.appendChild(t)})),m.appendChild(r.cloneNode(!0)),m.appendChild(r.cloneNode(!0)),"#comments-section"==location.hash&&(location.hash="",location.hash="#comments-section")}function submitComment(e){const t=document.querySelector('#comment-editor input[name="author"]'),n=document.querySelector("#comment-editor textarea");if(""==n.value)return void mw.notify("(本文が)ないです");e.target.disabled=!0,e.target.innerHTML="送信中…";const o={article_id:RLCONF.wgArticleId,author:t.value,comment:n.value},c=[];for(const[e,t]of Object.entries(o))c.push(`${encodeURIComponent(e)}=${encodeURIComponent(t)}`);const m=new XMLHttpRequest;m.onreadystatechange=()=>{4===m.readyState&&(e.target.disabled=!1,e.target.innerHTML="投稿する",200===m.status?(mw.notify("投稿しました"),t.value="",n.value="",document.querySelector("#comments").innerHTML="",document.querySelector("#comments-recent").innerHTML="",setTimeout((()=>{fetchComments(0)}),"100")):403===m.status?mw.notify("(フリーWi-Fiからは書け)ないです"):429===m.status?mw.notify("書きすぎィ!ちょっと待って、どうぞ!"):mw.notify("投稿できませんでした…"))},m.open("POST","/comments/comments.php"),m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.send(c.join("&").replace(/%20/g,"+"))}window.addEventListener("load",(()=>{if(0==RLCONF.wgNamespaceNumber&&"view"==RLCONF.wgAction&&0!=RLCONF.wgArticleId&&!RLCONF.wgIsRedirect&&RLCONF.wgRevisionId==RLCONF.wgCurRevisionId){"#comments-section"==location.hash&&window.scroll(0,document.documentElement.scrollHeight-document.documentElement.clientHeight),window.comments={};const e=new XMLHttpRequest;e.onreadystatechange=()=>{4===e.readyState&&200===e.status&&(window.comments.template=(new DOMParser).parseFromString(e.responseText,"text/html").body,document.querySelector("#bodyContent").appendChild(window.comments.template.querySelector("#comments-section")),document.querySelector("#comment-submit").addEventListener("click",submitComment),fetchComments(0))},e.open("GET","/comments/template.html",!0),e.send()}}));mw.loader.impl((function(){return["mediawiki.page.ready@1mbf4",{main:"ready.js",files:{"ready.js":function(e,t,n){var o=e("./checkboxShift.js"),i=e("./config.json"),a=e("./teleportTarget.js");function r(e){var t=!!("mediawiki.searchSuggest"===e&&"vector"===mw.config.get("skin")&&window.performance&&performance.mark&&performance.measure&&performance.getEntriesByName);function n(){t&&performance.mark("mwVectorLegacySearchLoadStart"),mw.loader.using(e,(function(){t&&performance.getEntriesByName("mwVectorLegacySearchLoadStart").length&&(performance.mark("mwVectorLegacySearchLoadEnd"),performance.measure("mwVectorLegacySearchLoadStartToLoadEnd","mwVectorLegacySearchLoadStart","mwVectorLegacySearchLoadEnd"))}))}!document.activeElement||"searchInput"!==document.activeElement.id&&!document.activeElement.classList.contains("mw-searchInput")?document.addEventListener("focusin",(function e(t){("searchInput"===t.target.id||t.target.classList.contains("mw-searchInput"))&&(n(),document.removeEventListener("focusin",e))})):n()}mw.config.get("wgBreakFrames")&&window.top!==window.self&&(window.top.location.href=location.href),mw.hook("wikipage.content").add((function(e){var t,n,a=[];i.collapsible&&(t=e.find(".mw-collapsible")).length&&a.push("jquery.makeCollapsible"),i.sortable&&(n=e.find("table.sortable")).length&&a.push("jquery.tablesorter"),a.length&&mw.loader.using(a).then((function(){n&&n.length&&n.tablesorter(),t&&t.length&&t.makeCollapsible()})),e[0]&&!1===e[0].isConnected&&mw.log.warn("wikipage.content hook should not be fired on unattached content"),o(e.find('input[type="checkbox"]:not(.noshiftselect)'))})),e("./toggleAllCollapsibles.js"),$((function(){$("[accesskey]").updateTooltipAccessKeys();var e=document.querySelector(".mw-indicators");e&&e.children.length&&mw.hook("wikipage.indicators").fire($(e.children));var t=$("#mw-content-text");t.length&&mw.hook("wikipage.content").fire(t);var n=$('.catlinks[data-mw="interface"]');n.length&&mw.hook("wikipage.categories").fire(n),(n=$('table.diff[data-mw="interface"]')).length&&mw.hook("wikipage.diff").fire(n.eq(0)),$("#t-print a").on("click",(function(e){window.print(),e.preventDefault()}));var o,r,c,l=$("#t-permalink a");function d(){mw.util.getTargetFromFragment()?l[0].hash=location.hash:l[0].hash=""}l.length&&($(window).on("hashchange",d),d()),mw.hook("skin.logout").add((function(e){mw.notify(mw.message("logging-out-notify"),{tag:"logout",autoHide:!1});var t=new mw.Api;t.postWithToken("csrf",{action:"logout"}).then((function(){location.href=e}),(function(e,n){mw.notify(t.getErrorMessage(n),{type:"error",tag:"logout",autoHide:!1})}))})),$(i.selectorLogoutLink).on("click",(function(e){mw.hook("skin.logout").fire(this.href),e.preventDefault()})),o=$("meta[name=viewport]"),r=o.attr("content"),c=window.outerWidth/window.innerWidth,window.innerWidth>=720&&window.innerWidth<=1e3&&r&&-1===r.indexOf("initial-scale")&&o.attr("content","width=1000,initial-scale="+c),a.attach()})),i.search&&r("mediawiki.searchSuggest");try{sessionStorage.getItem("mw-PostEdit"+mw.config.get("wgPageName"))&&mw.loader.load("mediawiki.action.view.postEdit")}catch(e){}t.exports={loadSearchModule:r,checkboxHack:e("./checkboxHack.js"),teleportTarget:a.target}},"checkboxShift.js":function(e,t,n){t.exports=function(e){var t;e.on("click",(function(n){t&&n.shiftKey&&e.slice(Math.min(e.index(t),e.index(n.target)),Math.max(e.index(t),e.index(n.target))+1).filter((function(){return!this.disabled&&this.checked!==n.target.checked})).prop("checked",n.target.checked).trigger("change"),t=n.target}))}},"checkboxHack.js":function(e,t,n){function o(e,t){if(t)return mw.log.warn("[1.38] The button parameter in updateAriaExpanded is deprecated, aria-expanded will be applied to the checkbox going forward. View the updated checkbox hack documentation for more details."),void t.setAttribute("aria-expanded",e.checked.toString());e.setAttribute("aria-expanded",e.checked.toString())}function i(e,t){var n;if(e.checked=t,"function"==typeof Event)n=new Event("input",{bubbles:!0,composed:!0});else{if(!(n=document.createEvent("CustomEvent")))return;n.initCustomEvent("input",!0,!1,!1)}e.dispatchEvent(n)}function a(e,t,n,o){!e.checked||o.target instanceof Node&&(e.contains(o.target)||t.contains(o.target)||n.contains(o.target))||i(e,!1)}function r(e,t){t&&mw.log.warn("[1.38] The button parameter in bindUpdateAriaExpandedOnInput is deprecated, aria-expanded will be applied to the checkbox going forward. View the updated checkbox hack documentation for more details.");var n=o.bind(void 0,e,t);return e.addEventListener("input",n),function(){e.removeEventListener("input",n)}}function c(e,t){function n(t){t.preventDefault(),i(e,!e.checked)}return t.addEventListener("click",n,!0),function(){t.removeEventListener("click",n,!0)}}function l(e){function t(t){"Enter"===t.key&&i(e,!e.checked)}return e.addEventListener("keyup",t),function(){e.removeEventListener("keyup",t)}}function d(e,t,n,o){var i=a.bind(void 0,t,n,o);return e.addEventListener("click",i,!0),function(){e.removeEventListener("click",i,!0)}}function s(e,t,n,o){var i=a.bind(void 0,t,n,o);return e.addEventListener("focusin",i,!0),function(){e.removeEventListener("focusin",i,!0)}}function u(e,t){function n(t){t.target&&t.target.parentNode&&("A"===t.target.nodeName||"A"===t.target.parentNode.nodeName)&&i(e,!1)}return t.addEventListener("click",n),function(){t.removeEventListener("click",n)}}t.exports={updateAriaExpanded:o,bindUpdateAriaExpandedOnInput:r,bindToggleOnClick:c,bindToggleOnSpaceEnter:function(e,t){function n(e){" "!==e.key&&"Enter"!==e.key||e.preventDefault()}function o(e){" "!==e.key&&"Enter"!==e.key||t.click()}return mw.log.warn("[1.38] bindToggleOnSpaceEnter is deprecated. Use `bindToggleOnEnter` instead."),t.addEventListener("keydown",n),t.addEventListener("keyup",o),function(){t.removeEventListener("keydown",n),t.removeEventListener("keyup",o)}},bindToggleOnEnter:l,bindDismissOnClickOutside:d,bindDismissOnFocusLoss:s,bindDismissOnClickLink:u,bind:function(e,t,n,o){var i=[r(t),c(t,n),l(t),d(e,t,n,o),s(e,t,n,o),u(t,o)];return function(){i.forEach((function(e){e()}))}}}},"teleportTarget.js":function(e,t,n){const o=document.createElement("div");o.id="mw-teleport-target",t.exports={target:o,attach(){document.body.appendChild(o)}}},"toggleAllCollapsibles.js":function(e,t,n){let o;mw.hook("wikipage.content").add((function(){if(o)return;if(!document.querySelector("#mw-content-text .mw-parser-output .mw-collapsible"))return;const e=mw.util.addPortletLink("p-tb","#",mw.msg("collapsible-expand-all-text"),"t-collapsible-toggle-all",mw.msg("collapsible-expand-all-tooltip"));if(!e)return;o=e.querySelector("a"),o.setAttribute("role","button"),o.setAttribute("aria-expanded","false");let t=!1;o.addEventListener("click",(function(e){if(e.preventDefault(),t){const e=document.querySelectorAll("#mw-content-text .mw-parser-output .mw-made-collapsible:not( .mw-collapsed )");Array.prototype.forEach.call(e,(function(e){$(e).data("mw-collapsible").collapse()})),o.textContent=mw.msg("collapsible-expand-all-text"),o.title=mw.msg("collapsible-expand-all-tooltip"),o.setAttribute("aria-expanded","false"),t=!1}else{const e=document.querySelectorAll("#mw-content-text .mw-parser-output .mw-made-collapsible.mw-collapsed");Array.prototype.forEach.call(e,(function(e){$(e).data("mw-collapsible").expand()})),o.textContent=mw.msg("collapsible-collapse-all-text"),o.title=mw.msg("collapsible-collapse-all-tooltip"),o.setAttribute("aria-expanded","true"),t=!0}}))}))},"config.json":{search:!1,collapsible:!0,sortable:!0,selectorLogoutLink:'#pt-logout a[data-mw="interface"]'}}},{css:["#mw-teleport-target{position:absolute;z-index:450}"]},{"collapsible-collapse-all-text":"すべて折り畳む","collapsible-collapse-all-tooltip":"現在のページ上にある折り畳み可能な要素をすべて折り畳む","collapsible-expand-all-text":"すべて開く","collapsible-expand-all-tooltip":"現在のページ上にある折り畳み可能な要素をすべて開く","logging-out-notify":"ログアウト中です。お待ちください。"}]})); wiki.yjsnpi.nu#@%#const shuffleArray=e=>e.sort((()=>Math.random()-Math.random()));function fetchComments(e){const t=new XMLHttpRequest;let n;t.onreadystatechange=()=>{4===t.readyState&&200===t.status&&(n=JSON.parse(t.responseText),renderComments(n))},t.open("GET","/comments/comments.php?article_id="+RLCONF.wgArticleId+"&cursor="+e,!0),t.send()}function fetchMore(e){fetchComments(e.target.dataset.cursor)}function renderComments(e){const t=document.querySelector("#comments"),n=document.querySelector("#comments-contents"),o=document.querySelector("#comments-loading"),c=document.querySelector("#comments-more"),m=document.querySelector("#comments-recent");if(o&&o.remove(),c&&c.remove(),e.comments.forEach((e=>{const n=window.comments.template.querySelector("#comment").cloneNode(!0);n.id="comment-"+e.number,n.dataset.commentId=e.comment_id,n.querySelector(".comment-author").innerHTML=e.author,n.querySelector(".comment-timestamp").innerHTML=e.created_at,n.querySelector(".comment-body").innerHTML=e.comment,t.appendChild(n)})),e.cursor>0){const t=window.comments.template.querySelector("#comments-more").cloneNode(!0);t.dataset.cursor=e.cursor,t.addEventListener("click",fetchMore),n.appendChild(t)}const r=document.createElement("ul");e.recent=shuffleArray(e.recent),e.recent.forEach((e=>{const t=document.createElement("li"),n=document.createElement("a");n.href="/w/index.php?curid="+e.article_id,e.comment.length>70&&(e.comment=e.comment.substring(0,70)+"…"),n.innerHTML=e.comment,t.appendChild(n),r.appendChild(t)})),m.appendChild(r.cloneNode(!0)),m.appendChild(r.cloneNode(!0)),"#comments-section"==location.hash&&(location.hash="",location.hash="#comments-section")}function submitComment(e){const t=document.querySelector('#comment-editor input[name="author"]'),n=document.querySelector("#comment-editor textarea");if(""==n.value)return void mw.notify("(本文が)ないです");e.target.disabled=!0,e.target.innerHTML="送信中…";const o={article_id:RLCONF.wgArticleId,author:t.value,comment:n.value},c=[];for(const[e,t]of Object.entries(o))c.push(`${encodeURIComponent(e)}=${encodeURIComponent(t)}`);const m=new XMLHttpRequest;m.onreadystatechange=()=>{4===m.readyState&&(e.target.disabled=!1,e.target.innerHTML="投稿する",200===m.status?(mw.notify("投稿しました"),t.value="",n.value="",document.querySelector("#comments").innerHTML="",document.querySelector("#comments-recent").innerHTML="",setTimeout((()=>{fetchComments(0)}),"100")):403===m.status?mw.notify("(フリーWi-Fiからは書け)ないです"):429===m.status?mw.notify("書きすぎィ!ちょっと待って、どうぞ!"):mw.notify("投稿できませんでした…"))},m.open("POST","/comments/comments.php"),m.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),m.send(c.join("&").replace(/%20/g,"+"))}window.addEventListener("load",(()=>{if(0==RLCONF.wgNamespaceNumber&&"view"==RLCONF.wgAction&&0!=RLCONF.wgArticleId&&!RLCONF.wgIsRedirect&&RLCONF.wgRevisionId==RLCONF.wgCurRevisionId){"#comments-section"==location.hash&&window.scroll(0,document.documentElement.scrollHeight-document.documentElement.clientHeight),window.comments={};const e=new XMLHttpRequest;e.onreadystatechange=()=>{4===e.readyState&&200===e.status&&(window.comments.template=(new DOMParser).parseFromString(e.responseText,"text/html").body,document.querySelector("#bodyContent").appendChild(window.comments.template.querySelector("#comments-section")),document.querySelector("#comment-submit").addEventListener("click",submitComment),fetchComments(0))},e.open("GET","/comments/template.html",!0),e.send()}})); ||wiki.yjsnpi.nu^$script