4chan/js/core.min.js
2025-04-17 14:46:47 -05:00

2 lines
No EOL
40 KiB
JavaScript

function mShowFull(e){var t,n;return"name"===e.className?(t=e.parentNode.parentNode.parentNode.getElementsByClassName("name")[1])&&(n=t.innerHTML):"subject"===e.parentNode.className?(t=e.parentNode.parentNode.parentNode.parentNode.getElementsByClassName("subject")[1])&&(n=t.innerHTML):/fileThumb/.test(e.parentNode.className)&&(t=e.parentNode.parentNode.getElementsByClassName("fileText")[0])&&(n=(t=t.firstElementChild).getAttribute("title")||t.innerHTML),n}function loadBannerImage(){var e=document.getElementById("bannerCnt");!e||e.offsetWidth<=0||(e.innerHTML='<img alt="4chan" src="//s.4cdn.org/image/title/'+e.getAttribute("data-src")+'">')}function onMobileSelectChange(){var e,t;t="f"!==(e=this.options[this.selectedIndex].value)&&/\/catalog$/.test(location.pathname)?"catalog":"",window.location="//boards."+$L.d(e)+"/"+e+"/"+t}function buildMobileNav(){var e,t,n,o,a,i;if(e=document.getElementById("boardSelectMobile")){for(a="",i=[],t=document.querySelectorAll("#boardNavDesktop .boardList a"),n=0;o=t[n];++n)i.push(o);for(i.sort(function(e,t){return e.textContent<t.textContent?-1:e.textContent>t.textContent?1:0}),n=0;o=i[n];++n)a+='<option class="'+(o.parentNode.classList.contains("nwsb")?"nwsb":"")+'" value="'+o.textContent+'">/'+o.textContent+"/ - "+o.title+"</option>";e.innerHTML=a}}function cloneTopNav(){var e,t,n,o;(e=document.getElementById("boardNavDesktop"))&&(n=document.getElementById("absbot"),(t=e.cloneNode(!0)).id=t.id+"Foot",(o=t.querySelector("#navtopright"))&&(o.id="navbotright"),(o=t.querySelector("#settingsWindowLink"))&&(o.id=o.id+"Bot"),document.body.insertBefore(t,n))}function initPass(){"1"==get_cookie("pass_enabled")||get_cookie("extra_path")?window.passEnabled=!0:window.passEnabled=!1}function initBlotter(){var e,t;(t=document.getElementById("toggleBlotter"))&&(t.addEventListener("click",toggleBlotter,!1),(e=localStorage.getItem("4chan-blotter"))&&+t.getAttribute("data-utc")<=+e&&toggleBlotter())}function toggleBlotter(e){var t,n;e&&e.preventDefault(),(t=document.getElementById("blotter-msgs"))&&(n=document.getElementById("toggleBlotter"),"none"==t.style.display?(t.style.display="",localStorage.removeItem("4chan-blotter"),n.textContent="Hide",(t=n.nextElementSibling).style.display&&(t.style.display="")):(t.style.display="none",localStorage.setItem("4chan-blotter",n.getAttribute("data-utc")),n.textContent="Show Blotter",n.nextElementSibling.style.display="none"))}function onRecaptchaLoaded(){"table"==document.getElementById("postForm").style.display&&initRecaptcha()}function initRecaptcha(){var e;(e=document.getElementById("g-recaptcha"))&&!e.firstElementChild&&!window.passEnabled&&window.grecaptcha&&grecaptcha.render(e,{sitekey:window.recaptchaKey,theme:"Tomorrow"===activeStyleSheet||window.dark_captcha?"dark":"light"})}function initTCaptcha(){let e=document.getElementById("t-root");if(e){let t,n=location.pathname.split(/\//)[1];t=document.forms.post&&document.forms.post.resto?+document.forms.post.resto.value:0,TCaptcha.init(e,n,t,5),TCaptcha.setErrorCb(window.showPostFormError)}}function initAnalytics(){var e,t,n,o,a,i,l,d=-1!==location.host.indexOf(".4channel.org")?"UA-166538-5":"UA-166538-1";e=window,t=document,n="script",o="//www.google-analytics.com/analytics.js",a="ga",e.GoogleAnalyticsObject=a,e[a]=e[a]||function(){(e[a].q=e[a].q||[]).push(arguments)},e[a].l=1*new Date,i=t.createElement(n),l=t.getElementsByTagName(n)[0],i.async=1,i.src=o,l.parentNode.insertBefore(i,l),ga("create",d,{sampleRate:1}),ga("set","anonymizeIp",!0),ga("send","pageview")}function initAdsPF(e,t){let n,o;if(1==t)n="657b2d8958f9186175770b1f",o="pf-6892-1";else if(2==t)n="657b2d9d58f9186175770b37",o="pf-6893-1";else if(3==t)n="657b2d56256794003cd16fe4",o="pf-6890-1";else{if(4!=t)return;n="657b2d74256794003cd17019",o="pf-6891-1"}e.innerHTML="";let a=document.createElement("div");a.id=o,e.appendChild(a),window.pubfuturetag=window.pubfuturetag||[],window.pubfuturetag.push({unit:n,id:o})}function initAdsADT(e){var t,n,o,a,i;for(a=window.matchMedia&&window.matchMedia("(max-width: 480px)").matches&&"true"!=localStorage.getItem("4chan_never_show_mobile")?"adg-m":"adg",n=(e||document).getElementsByClassName(a),o=0;t=n[o];++o)t.hasAttribute("data-abc")&&((i=document.createElement("iframe")).setAttribute("scrolling","no"),i.setAttribute("frameborder","0"),i.setAttribute("allowtransparency","true"),i.setAttribute("marginheight","0"),i.setAttribute("marginwidth","0"),"adg"===a?(i.setAttribute("width","728"),i.setAttribute("height","90")):(i.setAttribute("width","300"),i.setAttribute("height","250")),i.setAttribute("name","spot_id_"+t.getAttribute("data-abc")),i.src="https://a.adtng.com/get/"+t.getAttribute("data-abc")+"?time="+Date.now(),t.appendChild(i))}function danboAddSlot(e,t,n,o){let a=27,i=document.createElement("div");return i.className="danbo_dta",n?(o?o="3":(o="4",i.id="js-danbo-rld"),i.setAttribute("data-danbo",`${a}-${t}-${o}-300-250`),i.classList.add("danbo-m")):(o?o="1":(o="2",i.id="js-danbo-rld"),i.setAttribute("data-danbo",`${a}-${t}-${o}-728-90`),i.classList.add("danbo-d")),e.appendChild(i),i}function initAdsDanbo(){if(!window.Danbo)return;let e=location.pathname.split(/\//)[1]||"_",t=window.matchMedia&&window.matchMedia("(max-width: 480px)").matches,n=document.getElementsByClassName("danbo-slot");for(let o of n){danboAddSlot(o,e,t,"danbo-s-t"===o.id)}window.addEventListener("message",function(e){"https://hakurei.cdnbo.org"===e.origin&&e.data&&"danbo"===e.data.origin&&window.initAdsFallback(e.data.unit_id)}),window.Danbo.initialize()}function reloadAdsDanbo(){let e=document.getElementById("danbo-s-b");e&&(e.innerHTML="",danboAddSlot(e,"a",window.matchMedia&&window.matchMedia("(max-width: 480px)").matches,!1),window.Danbo.reload("js-danbo-rld"))}function initAdsFallback(e){let t,n=window.danbo_fb;t=1==e||3==e?"danbo-s-t":"danbo-s-b";let o=document.getElementById(t);if(!o)return;let a=document.body.classList.contains("ws"),i=a?.1:.01;if(Math.random()<i)return initAdsHome(o);"danbo-s-t"===t?a?initAdsPF(o,e):n?1==e&&n.t_abc_d?(o.innerHTML=`<div class="adg-rects desktop"><div class="adg adp-90" data-abc="${n.t_abc_d}"></div></div>`,initAdsADT(o)):3==e&&n.t_abc_m?(o.innerHTML=`<div class="adg-rects mobile"><div class="adg-m adp-250" data-abc="${n.t_abc_m}"></div></div>`,initAdsADT(o)):initAdsHome(o):initAdsHome(o):"danbo-s-b"===t?a?initAdsPF(o,e):n&&4==e&&n.b_abc_m?(o.innerHTML=`<div class="adg-rects mobile"><div class="adg-m adp-250" data-abc="${n.b_abc_m}"></div></div>`,initAdsADT(o)):initAdsHome(o):console.log("Fallback",e)}function initAdsHome(e){let t,n,o=[["advertise","1.png","2.png","3.png"],["pass","4.png"]],a=[["advertise","1m.png"]];t=location.host.indexOf("4channel")?"4channel":"4chan";let i=(n=(n=window.matchMedia&&window.matchMedia("(max-width: 480px)").matches?a:o)[Math.floor(Math.random()*n.length)])[0],l=n[1+Math.floor(Math.random()*(n.length-1))],d=document.createElement("a");d.href=`https://www.${t}.org/${i}`,d.target="_blank";let r=document.createElement("img");r.src="//s.4cdn.org/image/banners/"+l,d.appendChild(r),e.children.length&&(e.innerHTML=""),e.appendChild(d)}function applySearch(e){var t;e&&e.preventDefault(),""!==(t=document.getElementById("search-box").value)&&(window.location.href="catalog#s="+t)}function onKeyDownSearch(e){13==e.keyCode&&applySearch()}function onReportClick(){var e,t,n,o;for(n=document.getElementsByTagName("input"),o=location.pathname.split(/\//)[1],e=0;t=n[e];++e)if("checkbox"==t.type&&t.checked&&"delete"==t.value)return reppop("https://sys."+$L.d(o)+"/"+o+"/imgboard.php?mode=report&no="+t.name.replace(/[a-z]+/,""))}function onStyleSheetChange(){setActiveStyleSheet(this.value)}function onPageSwitch(e){e.preventDefault(),window.location=this.action}function onMobileFormClick(e){var t=location.pathname.split(/\//).length<4;e.preventDefault(),window.QR&&Main.tid&&QR.enabled?QR.show(Main.tid):"mpostform"==this.parentNode.id?toggleMobilePostForm(t):toggleMobilePostForm(t,1)}function onMobileRefreshClick(){locationHashChanged(this)}function toggle(e){var t=document.getElementById(e);t.style.display="block"!=t.style.display?"block":"none"}function quote(e){if(document.selection)document.post.com.focus(),document.selection.createRange().text=">>"+e+"\n";else if(document.post.com.selectionStart||"0"==document.post.com.selectionStart){var t=document.post.com.selectionStart,n=document.post.com.selectionEnd;document.post.com.value=document.post.com.value.substring(0,t)+">>"+e+"\n"+document.post.com.value.substring(n,document.post.com.value.length)}else document.post.com.value+=">>"+e+"\n"}function repquote(e){""==document.post.com.value&&quote(e)}function reppop(e){var t;return t=window.passEnabled||!window.grecaptcha?205:510,window.open(e,Date.now(),"toolbar=0,scrollbars=1,location=0,status=1,menubar=0,resizable=1,width=380,height="+t),!1}function recaptcha_load(){document.getElementById("recaptcha_div")&&Recaptcha.create("6Ldp2bsSAAAAAAJ5uyx_lx34lJeEpTLVkP5k04qc","recaptcha_div",{theme:"clean"})}function onParsingDone(e){var t,n,o,a,i,l,d;if(i=e.detail.threadId,l=e.detail.offset)for(n=document.getElementById("t"+i).getElementsByClassName("nameBlock"),d=e.detail.limit?2*e.detail.limit:n.length,t=2*l+1;t<d;t+=2)(o=n[t].children[1])&&(currentHighlighted&&-1!=o.className.indexOf("id_"+currentHighlighted)&&((a=o.parentNode.parentNode.parentNode).className="highlight "+a.className),o.addEventListener("click",idClick,!1))}function loadExtraScripts(){var e,t;return!(!(t=readCookie("extra_path"))||!/^[a-z0-9]+$/.test(t))&&(window.FC?((e=document.createElement("script")).type="text/javascript",e.src="https://s.4cdn.org/js/"+t+"."+jsVersion+".js",document.head.appendChild(e)):document.write('<script type="text/javascript" src="https://s.4cdn.org/js/'+t+"."+jsVersion+'.js"></script>'),!0)}function toggleMobilePostForm(e,t){var n=document.getElementById("mpostform").firstElementChild,o=document.getElementById("postForm");n.className.match("hidden")?(n.className=n.className.replace("hidden","shown"),o.className=o.className.replace(" hideMobile",""),n.innerHTML="Close Post Form",initRecaptcha(),initTCaptcha(),checkIncognito()):(n.className=n.className.replace("shown","hidden"),o.className+=" hideMobile",n.innerHTML=e?"Start New Thread":"Post Reply"),t&&n.scrollIntoView()}function toggleGlobalMessage(e){var t,n;e&&e.preventDefault(),t=document.getElementById("globalToggle"),n=document.getElementById("globalMessage"),t.className.match("hidden")?(t.className=t.className.replace("hidden","shown"),n.className=n.className.replace(" hideMobile",""),t.innerHTML="Close Announcement"):(t.className=t.className.replace("shown","hidden"),n.className+=" hideMobile",t.innerHTML="View Announcement")}function checkRecaptcha(){"undefined"!=typeof RecaptchaState.timeout&&1800==RecaptchaState.timeout&&(RecaptchaState.timeout=570,Recaptcha._reset_timer(),clearInterval(captchainterval))}function setPassMsg(){var e,t;(e=document.getElementById("captchaFormPart"))&&(t='You are using a 4chan Pass. [<a href="https://sys.'+$L.d(location.pathname.split(/\//)[1])+'/auth?act=logout" onclick="confirmPassLogout(event);" tabindex="-1">Logout</a>]',e.children[1].innerHTML='<div style="padding: 5px;">'+t+"</div>")}function confirmPassLogout(e){if(!confirm("Are you sure you want to logout?"))return e.preventDefault(),!1}function initStyleSheet(){var e,t,n,o;if(!window.FC){if(window.style_group){var a=readCookie(style_group);activeStyleSheet=a||getPreferredStyleSheet()}switch(window.css_event&&localStorage.getItem("4chan_stop_css_event")!==`${window.css_event}-${window.css_event_v}`&&(activeStyleSheet="_special"),activeStyleSheet){case"Yotsuba B":setActiveStyleSheet("Yotsuba B New",!0);break;case"Yotsuba":setActiveStyleSheet("Yotsuba New",!0);break;case"Burichan":setActiveStyleSheet("Burichan New",!0);break;case"Futaba":setActiveStyleSheet("Futaba New",!0);break;default:setActiveStyleSheet(activeStyleSheet,!0)}if("true"==localStorage.getItem("4chan_never_show_mobile"))for(o=(n=document.querySelectorAll("link")).length,e=0;e<o;e++)n[e].getAttribute("href").match("mobile")&&(t=n[e]).parentNode.removeChild(t)}}function pageHasMath(){var e,t,n;for(n=document.getElementsByClassName("postMessage"),e=0;t=n[e];++e)if(/\[(?:eqn|math)\]|"math">/.test(t.innerHTML))return!0;return!1}function cleanWbr(e){var t,n,o;for(t=(n=e.getElementsByTagName("wbr")).length-1;o=n[t];t--)o.parentNode.removeChild(o)}function parseMath(){var e,t,n;for(n=document.getElementsByClassName("postMessage"),e=0;t=n[e];++e)/\[(?:eqn|math)\]/.test(t.innerHTML)&&cleanWbr(t);MathJax.Hub.Queue(["Typeset",MathJax.Hub,n])}function loadMathJax(){var e,t;e=document.getElementsByTagName("head")[0],(t=document.createElement("script")).type="text/x-mathjax-config",t.text="MathJax.Hub.Config({extensions: ['Safe.js'],tex2jax: { processRefs: false, processEnvironments: false, preview: 'none', inlineMath: [['[math]','[/math]']], displayMath: [['[eqn]','[/eqn]']] },Safe: { allow: { URLs: 'none', classes: 'none', cssIDs: 'none', styles: 'none', fontsize: 'none', require: 'none' } },displayAlign: 'left', messageStyle: 'none', skipStartupTypeset: true,'CHTML-preview': { disabled: true }, MathMenu: { showRenderer: false, showLocale: false },TeX: { Macros: { color: '{}', newcommand: '{}', renewcommand: '{}', newenvironment: '{}', renewenvironment: '{}', def: '{}', let: '{}'}}});",e.appendChild(t),(t=document.createElement("script")).src="//cdn.mathjax.org/mathjax/2.6-latest/MathJax.js?config=TeX-AMS_HTML-full",t.onload=parseMath,e.appendChild(t)}function init(){var e,t,n="undefined"!=typeof is_error,o=location.href.match(/(?:4chan|4channel)\.org\/(\w+)/)[1],a=location.href.split(/#/);if(a[1]&&a[1].match(/q[0-9]+$/)&&repquote(a[1].match(/q([0-9]+)$/)[1]),window.math_tags&&pageHasMath()&&loadMathJax(),navigator.userAgent&&navigator.userAgent.match(/iP(hone|ad|od)/i))for(links=document.querySelectorAll("s"),len=links.length,t=0;t<len;t++)links[t].onclick=function(){this.hasAttribute("style")?this.removeAttribute("style"):this.setAttribute("style","color: #fff!important;")};if(document.getElementById("styleSelector"))for(styleSelect=document.getElementById("styleSelector"),len=styleSelect.options.length,t=0;t<len;t++)styleSelect.options[t].value!=activeStyleSheet||(styleSelect.selectedIndex=t);!n&&document.forms.post&&"i"!=o&&"ic"!=o&&"f"!=o&&window.File&&window.FileReader&&window.FileList&&window.Blob&&(e=document.getElementById("postFile"))&&e.addEventListener("change",handleFileSelect,!1),"undefined"!=typeof extra&&extra&&!n&&extra.init()}function onComKeyDown(){clearTimeout(coreLenCheckTimeout),coreLenCheckTimeout=setTimeout(coreCheckComLength,500)}function coreCheckComLength(){var e,t,n;comlen&&(t=document.getElementsByName("com")[0],(e=encodeURIComponent(t.value).split(/%..|./).length-1)>comlen?((n=document.getElementById("comlenError"))||((n=document.createElement("div")).id="comlenError",n.style.cssText="font-weight:bold;padding:5px;color:red;",t.parentNode.appendChild(n)),n.textContent="Error: Comment too long ("+e+"/"+comlen+")."):(n=document.getElementById("comlenError"))&&n.parentNode.removeChild(n))}function disableMobile(){localStorage.setItem("4chan_never_show_mobile","true"),location.reload(!0)}function enableMobile(){localStorage.removeItem("4chan_never_show_mobile"),location.reload(!0)}function enableClickableIds(){var e=0,t=0,n=document.getElementsByClassName("posteruid"),o=document.getElementsByClassName("capcode");if(null!=o)for(e=0,t=o.length;e<t;e++)o[e].addEventListener("click",idClick,!1);if(null!=n)for(e=0,t=n.length;e<t;e++)n[e].addEventListener("click",idClick,!1)}function idClick(e){var t,n=0,o=0,a="hand"==e.target.className?e.target.parentNode.className.match(/id_([^ $]+)/)[1]:e.target.className.match(/id_([^ $]+)/)[1],i=document.getElementsByClassName("highlight");for(o=i.length,n=0;n<o;n++){var l=i[0].className.toString();i[0].className=l.replace(/highlight /g,"")}if(currentHighlighted!=a){currentHighlighted=a;var d=document.getElementsByClassName("id_"+a);for(o=d.length,n=0;n<o;n++)(t=d[n].parentNode.parentNode.parentNode).className.match(/highlight /)||(t.className="highlight "+t.className)}else currentHighlighted=null}function showPostFormError(e){var t=document.getElementById("postFormError");e?(t.innerHTML=e,t.style.display="block"):(t.textContent="",t.style.display="")}function handleFileSelect(){var e,t;this.files&&(t=window.maxFilesize,e=this.files[0].size,-1!==this.files[0].type.indexOf("video/")&&window.maxWebmFilesize&&(t=window.maxWebmFilesize),e>t?showPostFormError("Error: Maximum file size allowed is "+Math.floor(t/1048576)+" MB"):showPostFormError())}function locationHashChanged(e){var t=document.getElementById("id_css");switch(e.id){case"refresh_top":url=window.location.href.replace(/#.+/,"#top"),/top$/.test(url)||(url+="#top"),t.innerHTML='<meta http-equiv="refresh" content="0;URL='+url+'">',document.location.reload(!0);break;case"refresh_bottom":url=window.location.href.replace(/#.+/,"#bottom"),/bottom$/.test(url)||(url+="#bottom"),t.innerHTML='<meta http-equiv="refresh" content="0;URL='+url+'">',document.location.reload(!0)}return!0}function setActiveStyleSheet(e,t){var n,o,a,i,l,d;if(1!=document.querySelectorAll("link[title]").length){for(a="",l=document.getElementsByTagName("link"),i=0;n=l[i];i++)"switch"==n.getAttribute("title")&&(o=n),-1!=n.getAttribute("rel").indexOf("style")&&n.getAttribute("title")&&n.getAttribute("title")==e&&(a=n.href);o&&o.setAttribute("href",a),t||("_special"!==e?(createCookie(style_group,e,365,-1===location.host.indexOf("4channel.org")?"4chan.org":"4channel.org"),window.css_event&&(d=window["fc_"+window.css_event+"_cleanup"],localStorage.setItem("4chan_stop_css_event",`${window.css_event}-${window.css_event_v}`))):window.css_event&&(d=window["fc_"+window.css_event+"_init"],localStorage.removeItem("4chan_stop_css_event")),activeStyleSheet=e,d&&d())}}function getActiveStyleSheet(){var e,t,n;if(1==document.querySelectorAll("link[title]").length)return"Yotsuba P";for(e=0;t=document.getElementsByTagName("link")[e];e++)if("switch"==t.getAttribute("title"))n=t;else if(-1!=t.getAttribute("rel").indexOf("style")&&t.getAttribute("title")&&t.href==n.href)return t.getAttribute("title");return null}function getPreferredStyleSheet(){return"ws_style"==style_group?"Yotsuba B New":"Yotsuba New"}function createCookie(e,t,n,o){let a;if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),a="; expires="+i.toGMTString()}else a="";o=o?"; domain="+o:"",document.cookie=e+"="+t+a+"; path=/"+o}function readCookie(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var a=n[o];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return decodeURIComponent(a.substring(t.length,a.length))}return""}function setRetinaIcons(){var e,t,n;for(n=document.getElementsByClassName("retina"),e=0;t=n[e];++e)t.src=t.src.replace(/\.(gif|png)$/,"@2x.$1")}function onCoreClick(e){/flag flag-/.test(e.target.className)&&1==e.which&&window.open("//s.4cdn.org/image/country/"+e.target.className.match(/flag-([a-z]+)/)[1]+".gif","")}function showPostForm(e){var t;e&&e.preventDefault(),(t=document.getElementById("postForm"))&&($.id("togglePostFormLink").style.display="none",t.style.display="table",initRecaptcha(),initTCaptcha())}function oeCanvasPreview(e){var t,n,o;if((n=document.getElementById("oe-canvas-preview"))&&n.parentNode.removeChild(n),"OPTION"==e.target.nodeName&&"0"!=e.target.value){if(!(t=document.getElementById("f"+e.target.value)))return;if(!(t=t.getElementsByTagName("img")[0])||!t.hasAttribute("data-md5"))return;(n=t.cloneNode()).id="oe-canvas-preview",(o=e.target.parentNode).parentNode.insertBefore(n,o.nextSibling)}}function oeClearPreview(){var e;(e=document.getElementById("oe-canvas-preview"))&&e.parentNode.removeChild(e)}function oeReplay(e){PainterCore.replay(e)}
/*! https://github.com/Joe12387/detectIncognito */function checkIncognito(){window.isIncognito===undefined&&(navigator.maxTouchPoints&&navigator.vendor!==undefined?new Promise(function(e){let t=eval.toString().length;if(0===navigator.vendor.indexOf("Apple")&&37===t){navigator.maxTouchPoints===undefined&&e(!1);let t=Math.random().toString();try{window.indexedDB.open(t,1).onupgradeneeded=function(n){let o=n.target.result;try{o.createObjectStore("test",{autoIncrement:!0}).put(new Blob),e(!1)}catch(a){let t;a instanceof Error&&(t=a.message),"string"!=typeof t&&e(!1),e(/BlobURLs are not yet supported/.test(t))}finally{o.close(),window.indexedDB.deleteDatabase(t)}}}catch(n){e(!1)}}else if(0===navigator.vendor.indexOf("Google")&&33===t){let t;try{t=performance.memory.jsHeapSizeLimit}catch(n){t=1073741824}navigator.webkitTemporaryStorage.queryUsageAndQuota(function(n,o){let a=Math.round(o/1048576),i=2*Math.round(t/1048576);e(a<i)},function(){e(!1)})}else document.body.style.MozAppearance!==undefined&&37===t?e(navigator.serviceWorker===undefined):e(!1)}).then(e=>window.isIncognito=e):window.isIncognito=!1)}function onPostFormSubmit(e){let t=$.id("postFile");if(t&&t.value&&window.isIncognito)return e.stopPropagation(),e.preventDefault(),t.value="",showPostFormError("Uploading files in incognito mode is not allowed.<br>The File field has been cleared."),!1}function contentLoaded(){var e,t,n,o,a,i,l,d,r,s;if(document.removeEventListener("DOMContentLoaded",contentLoaded,!0),initAdsADT(),initAdsDanbo(),document.post&&(document.post.name.value=get_cookie("4chan_name"),document.post.email.value=get_cookie("options"),document.post.addEventListener("submit",onPostFormSubmit,!1)),cloneTopNav(),initAnalytics(),d=(l=location.pathname.split(/\//))[1],window.passEnabled&&setPassMsg(),window.Tegaki&&PainterCore.init(),(t=document.getElementById("bottomReportBtn"))&&t.addEventListener("click",onReportClick,!1),(t=document.getElementById("styleSelector"))&&t.addEventListener("change",onStyleSheetChange,!1),(t=document.getElementById("togglePostFormLink"))&&((t=t.firstElementChild)&&t.addEventListener("click",showPostForm,!1),"#reply"===location.hash&&showPostForm()),(t=document.forms.post)&&t.flag&&(t.flag.addEventListener("change",onBoardFlagChanged,!1),(r=localStorage.getItem("4chan_flag_"+d))&&(n=t.querySelector('option[value="'+r+'"]'))&&n.setAttribute("selected","selected")),buildMobileNav(),(t=document.getElementById("globalToggle"))&&t.addEventListener("click",toggleGlobalMessage,!1),"true"==localStorage.getItem("4chan_never_show_mobile")&&(t=document.getElementById("disable-mobile"))&&(t.style.display="none",(t=document.getElementById("enable-mobile")).parentNode.style.cssText="display: inline !important;"),i=document.getElementById("boardSelectMobile")){for(a=i.options.length,e=0;e<a;e++)i.options[e].value!=d||(i.selectedIndex=e);i.addEventListener("change",onMobileSelectChange,!1)}if(document.forms.oeform&&(t=document.forms.oeform.oe_src)&&(t.addEventListener("mouseover",oeCanvasPreview,!1),t.addEventListener("mouseout",oeClearPreview,!1)),"catalog"!=l[2]){for(o=document.getElementsByClassName("mobilePostFormToggle"),e=0;t=o[e];++e)t.addEventListener("click",onMobileFormClick,!1);if((t=document.getElementsByName("com")[0])&&(t.addEventListener("keydown",onComKeyDown,!1),t.addEventListener("paste",onComKeyDown,!1),t.addEventListener("cut",onComKeyDown,!1)),(t=document.getElementById("refresh_top"))&&t.addEventListener("mouseup",onMobileRefreshClick,!1),(t=document.getElementById("refresh_bottom"))&&t.addEventListener("mouseup",onMobileRefreshClick,!1),"int"!=d&&"sp"!=d&&"pol"!=d||(t=document.getElementById("delform")).addEventListener("click",onCoreClick,!1),!l[3]){for(o=document.getElementsByClassName("pageSwitcherForm"),e=0;t=o[e];++e)t.addEventListener("submit",onPageSwitch,!1);(t=document.getElementById("search-box"))&&t.addEventListener("keydown",onKeyDownSearch,!1)}window.clickable_ids&&enableClickableIds(),Tip.init()}window.devicePixelRatio>=2&&setRetinaIcons(),initBlotter(),loadBannerImage(),window.css_event&&"_special"===activeStyleSheet&&(s=window["fc_"+window.css_event+"_init"])&&s()}function onBoardFlagChanged(){var e="4chan_flag_"+location.pathname.split(/\//)[1];"0"===this.value?localStorage.removeItem(e):localStorage.setItem(e,this.value)}var activeStyleSheet,$L={nws:{aco:1,b:1,bant:1,d:1,e:1,f:1,gif:1,h:1,hc:1,hm:1,hr:1,i:1,ic:1,pol:1,r:1,r9k:1,s:1,s4s:1,soc:1,t:1,trash:1,u:1,wg:1,y:1},blue:"4chan.org",red:"4chan.org",d:function(e){return $L.nws[e]?$L.red:$L.blue}},TCaptcha={node:null,frameNode:null,imgCntNode:null,bgNode:null,fgNode:null,msgNode:null,sliderNode:null,respNode:null,reloadNode:null,helpNode:null,challengeNode:null,ticketCaptchaNode:null,challenge:null,reloadTs:null,reloadTimeout:null,expireTimeout:null,frameTimeout:null,pcdBypassable:!1,errorCb:null,path:"/captcha",ticketKey:"4chan-tc-ticket",domain:"4chan.org",failCd:60,tabindex:null,hCaptchaSiteKey:"49d294fa-f15c-41fc-80ba-c2544c52ec2a",init:function(e,t,n,o){this.node&&this.destroy(),o&&(this.tabindex=o),this.node=e,e.style.position="relative",e.style.width="300px",this.frameNode=null,this.imgCntNode=this.buildImgCntNode(),this.bgNode=this.buildImgNode("bg"),this.fgNode=this.buildImgNode("fg"),this.sliderNode=this.buildSliderNode(),this.respNode=this.buildRespField(),this.reloadNode=this.buildReloadNode(t,n),this.helpNode=this.buildHelpNode(),this.msgNode=this.buildMsgNode(),this.challengeNode=this.buildChallengeNode(),e.appendChild(this.reloadNode),e.appendChild(this.respNode),e.appendChild(this.helpNode),this.imgCntNode.appendChild(this.bgNode),this.imgCntNode.appendChild(this.fgNode),e.appendChild(this.imgCntNode),e.appendChild(this.sliderNode),e.appendChild(this.msgNode),e.appendChild(this.challengeNode),window.addEventListener("message",this.onFrameMessage)},destroy:function(){let e=TCaptcha;e.node&&(window.removeEventListener("message",e.onFrameMessage),clearTimeout(e.frameTimeout),clearTimeout(e.reloadTimeout),clearTimeout(e.expireTimeout),e.node.textContent="",e.node=null,e.frameNode=null,e.imgCntNode=null,e.bgNode=null,e.fgNode=null,e.msgNode=null,e.sliderNode=null,e.respNode=null,e.reloadNode=null,e.helpNode=null,e.challengeNode=null,e.ticketCaptchaNode=null,e.challenge=null,e.pcdBypassable=!1,e.errorCb=null,e.reloadTs=null,e.onReloadCdDone=null)},setErrorCb:function(e){TCaptcha.errorCb=e},toggleImgCntNode:function(e){TCaptcha.imgCntNode.style.display=e?"block":"none"},getTicket:function(){return localStorage.getItem(TCaptcha.ticketKey)},setTicket:function(e){e?localStorage.setItem(TCaptcha.ticketKey,e):!1===e&&localStorage.removeItem(TCaptcha.ticketKey)},buildFrameNode:function(){let e=document.createElement("iframe");return e.id="t-frame",e.style.border="0",e.style.width="100%",e.style.height="80px",e.style.marginTop="2px",e.style.position="relative",e.style.display="block",e.onerror=TCaptcha.onFrameError,e},buildImgCntNode:function(){let e=document.createElement("div");return e.id="t-cnt",e.style.height="80px",e.style.marginTop="2px",e.style.position="relative",e},buildImgNode:function(e){let t=document.createElement("div");return t.id="t-"+e,t.style.width="100%",t.style.height="100%",t.style.position="absolute",t.style.backgroundRepeat="no-repeat",t.style.backgroundPosition="top left",t.style.pointerEvents="none",t},buildMsgNode:function(){let e=document.createElement("div");return e.id="t-msg",e.style.width="100%",e.style.height="calc(100% - 20px)",e.style.position="absolute",e.style.top="20px",e.style.textAlign="center",e.style.fontSize="12px",e.style.filter="inherit",e.style.display="none",e.style.alignContent="center",e},buildRespField:function(){let e=document.createElement("input");return e.id="t-resp",e.name="t-response",e.placeholder="Type the CAPTCHA here",e.setAttribute("autocomplete","off"),e.type="text",e.style.width="160px",e.style.boxSizing="border-box",e.style.textTransform="uppercase",e.style.fontSize="11px",e.style.height="18px",e.style.margin="0",e.style.padding="0 2px",e.style.fontFamily="monospace",e.style.verticalAlign="middle",this.tabindex&&e.setAttribute("tabindex",this.tabindex+2),e},buildSliderNode:function(){let e=document.createElement("input");return e.id="t-slider",e.setAttribute("autocomplete","off"),e.type="range",e.style.width="100%",e.style.boxSizing="border-box",e.style.visibility="hidden",e.style.margin="0",e.style.transition="box-shadow 15s linear",e.style.boxShadow="0 0 6px 4px #1d8dc4",e.style.position="relative",e.value=0,e.min=0,e.max=100,e.addEventListener("input",this.onSliderInput,!1),this.tabindex&&e.setAttribute("tabindex",this.tabindex+1),e},buildChallengeNode:function(){let e=document.createElement("input");return e.name="t-challenge",e.type="hidden",e},buildReloadNode:function(e,t){let n=document.createElement("button");return n.id="t-load",n.type="button",n.style.fontSize="11px",n.style.padding="0",n.style.width="90px",n.style.boxSizing="border-box",n.style.margin="0 6px 0 0",n.style.verticalAlign="middle",n.style.height="18px",n.textContent="Get Captcha",n.setAttribute("data-board",e),n.setAttribute("data-tid",t),n.addEventListener("click",this.onReloadClick,!1),this.tabindex&&n.setAttribute("tabindex",this.tabindex),n},buildHelpNode:function(){let e=document.createElement("button");return e.id="t-help",e.type="button",e.style.fontSize="11px",e.style.padding="0",e.style.width="20px",e.style.boxSizing="border-box",e.style.margin="0 0 0 6px",e.style.verticalAlign="middle",e.style.height="18px",e.textContent="?",e.setAttribute("data-tip","Help"),e.tabIndex=-1,e.addEventListener("click",this.onHelpClick,!1),e},onHelpClick:function(){alert("- Only type letters and numbers displayed in the image.\n- If needed, use the slider to align the image to make it readable.\n- Make sure to not block any cookies set by 4chan.")},onTicketCaptchaError:function(){TCaptcha.toggleMsgOverlay(!0,"Couldn't load the captcha.<br><br>Please check your browser's content blocker.")},onTicketCaptchaDone:function(e){TCaptcha.reloadNode.setAttribute("data-ticket-resp",e),TCaptcha.destroyTicketCaptcha(),TCaptcha.onReloadClick()},loadTicketCaptcha:function(){window.pcd_c_loaded=TCaptcha.buildTicketCaptcha,window.pcd_c_done=TCaptcha.onTicketCaptchaDone,TCaptcha.toggleMsgOverlay(!0,"Loading\u2026");let e=document.createElement("script");e.src="https://js.hcaptcha.com/1/api.js?onload=pcd_c_loaded&render=explicit&recaptchacompat=off",e.onerror=TCaptcha.onTicketCaptchaError,document.head.appendChild(e)},buildTicketCaptcha:function(){let e=TCaptcha;if(e.toggleMsgOverlay(!1),!window.hcaptcha)return void e.loadTicketCaptcha();let t=document.createElement("div");t.id="t-tc-cnt",e.imgCntNode.appendChild(t);let n=window.hcaptcha.render("t-tc-cnt",{sitekey:e.hCaptchaSiteKey,callback:"pcd_c_done"});t.setAttribute("data-wid",n),e.ticketCaptchaNode=t},destroyTicketCaptcha:function(){let e=TCaptcha;if(!window.hcaptcha||!e.ticketCaptchaNode)return;let t=e.ticketCaptchaNode.getAttribute("data-wid");window.hcaptcha.reset(t),e.imgCntNode.removeChild(e.ticketCaptchaNode),e.ticketCaptchaNode=null},onReloadClick:function(){let e=TCaptcha.reloadNode,t=e.getAttribute("data-board"),n=e.getAttribute("data-tid"),o=e.getAttribute("data-ticket-resp");e.removeAttribute("data-ticket-resp"),TCaptcha.toggleReloadBtn(!1,"Loading"),TCaptcha.load(t,n,o)},onFrameMessage:function(e){e.origin===`https://sys.${TCaptcha.domain}`&&e.data&&e.data.twister&&(TCaptcha.destroyFrame(),TCaptcha.buildFromJson(e.data.twister))},onFrameError:function(e){TCaptcha.unlockReloadBtn(),console.log(e),TCaptcha.errorCb&&TCaptcha.errorCb.call(null,"Couldn't load the captcha frame. Check your content blocker settings.")},load:function(e,t,n){let o=TCaptcha;clearTimeout(o.frameTimeout),clearTimeout(o.reloadTimeout),clearTimeout(o.expireTimeout);let a=["framed=1"];e&&a.push("board="+e),t>0&&a.push("thread_id="+t),n&&a.push("ticket_resp="+encodeURIComponent(n));let i=o.getTicket();i&&a.push("ticket="+i),a.length>0&&(a="?"+a.join("&"));let l="https://sys."+o.domain+o.path+a;o.frameNode=o.buildFrameNode(),o.toggleImgCntNode(!1),o.node.insertBefore(o.frameNode,o.imgCntNode),o.frameTimeout=setTimeout(o.onFrameTimeout,6e4,l),o.frameNode.src=l},onFrameTimeout:function(e){let t=TCaptcha;t.destroyFrame(),console.log("Captcha frame timeout"),t.errorCb&&t.errorCb.call(null,`Couldn't get the captcha.\nMake sure your browser doesn't block content on 4chan then click\n<a href="${e.replace("framed=1","opened=1")}" target="_blank">here</a>.`)},destroyFrame:function(){let e=TCaptcha;clearTimeout(e.frameTimeout),e.frameTimeout=null,e.frameNode&&(e.frameNode.remove(),e.frameNode=null),e.toggleImgCntNode(!0),e.unlockReloadBtn()},unlockReloadBtn:function(){TCaptcha.reloadTs=null,TCaptcha.toggleReloadBtn(!0,"Get Captcha")},toggleReloadBtn:function(e,t){let n=TCaptcha;n.reloadNode&&(n.reloadNode.disabled=!e,t!==undefined&&(n.reloadNode.textContent=t))},onCaptchaFailed:function(){let e=TCaptcha,t=1e3*e.failCd;e.reloadTs&&e.reloadTs<t&&e.setReloadCd(t,!0)},setReloadCd:function(e,t,n){let o=TCaptcha;o.node&&(clearTimeout(o.reloadTimeout),o.onReloadCdDone=n,o.pcdBypassable=-1===t,e?(o.toggleReloadBtn(!1),t?(o.reloadTs=Date.now()+e,o.onReloadCdTick()):o.reloadTimeout=setTimeout(o.stopReloadCd,e)):o.stopReloadCd())},stopReloadCd:function(){let e=TCaptcha;e.unlockReloadBtn(),e.onReloadCdDone&&e.onReloadCdDone.call(e)},onReloadCdTick:function(){let e=TCaptcha;if(!e.reloadNode||!e.reloadTs)return;let t=e.reloadTs-Date.now();e.pcdBypassable&&-1!==document.cookie.indexOf("_ev1=")&&(t=0),t>0?(e.reloadNode.textContent=Math.ceil(t/1e3),e.reloadTimeout=setTimeout(e.onReloadCdTick,Math.min(t,1e3))):e.stopReloadCd()},clearChallenge:function(){let e=TCaptcha;e.node&&(e.challengeNode.value="",e.respNode.value="",e.fgNode.style.backgroundImage="",e.bgNode.style.backgroundImage="",e.toggleSlider(!1),e.toggleMsgOverlay(!1))},toggleSlider:function(e){TCaptcha.sliderNode.style.visibility=e?"":"hidden",TCaptcha.sliderNode.style.boxShadow=e?"":"0 0 4px 2px #1d8dc4"},toggleMsgOverlay:function(e,t){t!==undefined&&(TCaptcha.msgNode.innerHTML=`<div>${t}</div>`),TCaptcha.msgNode.style.display=e?"grid":"none"},onSliderInput:function(){var e=-Math.floor(+this.value/100*this.twisterDelta);TCaptcha.bgNode.style.backgroundPositionX=e+"px"},onTicketPcdTick:function(){let e=TCaptcha,t=document.getElementById("t-pcd");if(!t)return;let n=+t.getAttribute("data-pcd");(n-=0|Date.now()/1e3)<=0?e.onTicketPcdEnd():(t.textContent=n,setTimeout(e.updateTicketPcd,1e3))},clearTicketOverlay:function(){TCaptcha.toggleMsgOverlay(!1)},buildFromJson:function(e){let t=TCaptcha;if(t.node){if(t.unlockReloadBtn(),t.toggleSlider(!1),t.toggleMsgOverlay(!1),t.setTicket(e.ticket),TCaptcha.errorCb&&TCaptcha.errorCb.call(null,""),e.cd&&t.setReloadCd(1e3*e.cd,!e.challenge),e.mpcd)return t.clearChallenge(),t.destroyTicketCaptcha(),void t.buildTicketCaptcha();if(e.pcd)t.buildTicket(e);else{if(e.error)return console.log(e.error),void(TCaptcha.errorCb&&TCaptcha.errorCb.call(null,e.error));t.imgCntNode.style.width=e.img_width+"px",t.imgCntNode.style.height=e.img_height+"px",t.challengeNode.value=e.challenge,t.expireTimeout=setTimeout(t.clearChallenge,1e3*e.ttl-3e3),e.bg_width?t.buildTwister(e):e.img?t.buildStatic(e):t.buildNoop(e)}}},buildTwister:function(e){let t=TCaptcha;t.fgNode.style.backgroundImage="url(data:image/png;base64,"+e.img+")",t.bgNode.style.backgroundImage="url(data:image/png;base64,"+e.bg+")",t.bgNode.style.backgroundPositionX="0px",t.toggleSlider(!0),t.sliderNode.value=0,t.sliderNode.twisterDelta=e.bg_width-e.img_width,t.sliderNode.focus()},buildStatic:function(e){let t=TCaptcha;t.fgNode.style.backgroundImage="url(data:image/png;base64,"+e.img+")",t.bgNode.style.backgroundImage=""},buildTicket:function(e){let t=TCaptcha;t.toggleMsgOverlay(!0,e.pcd_msg||"Please wait a while."),t.fgNode.style.backgroundImage="",t.bgNode.style.backgroundImage="",t.setReloadCd(1e3*e.pcd,!e.bpcd||-1,t.clearTicketOverlay)},buildNoop:function(){let e=TCaptcha;e.toggleMsgOverlay(!0,"Verification not required."),e.fgNode.style.backgroundImage="",e.bgNode.style.backgroundImage=""}},Tip={node:null,timeout:null,delay:300,init:function(){document.addEventListener("mouseover",this.onMouseOver,!1),document.addEventListener("mouseout",this.onMouseOut,!1)},onMouseOver:function(e){var t,n,o;o=e.target,Tip.timeout&&(clearTimeout(Tip.timeout),Tip.timeout=null),o.hasAttribute("data-tip")&&(n=null,o.hasAttribute("data-tip-cb")&&(t=o.getAttribute("data-tip-cb"),window[t]&&(n=window[t](o))),Tip.timeout=setTimeout(Tip.show,Tip.delay,e.target,n))},onMouseOut:function(){Tip.timeout&&(clearTimeout(Tip.timeout),Tip.timeout=null),Tip.hide()},show:function(e,t,n){var o,a,i,l,d;a=e.getBoundingClientRect(),(o=document.createElement("div")).id="tooltip",t?o.innerHTML=t:o.textContent=e.getAttribute("data-tip"),n||(n="top"),o.className="tip-"+n,document.body.appendChild(o),(l=a.left-(o.offsetWidth-e.offsetWidth)/2)<0?(l=a.left+2,o.className+="-right"):l+o.offsetWidth>document.documentElement.clientWidth&&(l=a.left-o.offsetWidth+e.offsetWidth+2,o.className+="-left"),d=a.top-o.offsetHeight-5,(i=o.style).top=d+window.pageYOffset+"px",i.left=l+window.pageXOffset+"px",Tip.node=o},hide:function(){Tip.node&&(document.body.removeChild(Tip.node),Tip.node=null)}};captchainterval=null;var coreLenCheckTimeout=null,currentHighlighted=null,get_cookie=readCookie,PainterCore={init:function(){var e,t;document.forms.post&&(e=document.forms.post.getElementsByClassName("painter-ctrl")[0])&&(t=e.getElementsByTagName("button"))[1]&&(this.data=null,this.replayBlob=null,this.time=0,this.btnDraw=t[0],this.btnClear=t[1],this.btnFile=document.getElementById("postFile"),this.btnSubmit=document.forms.post.querySelector('input[type="submit"]'),this.inputNodes=e.getElementsByTagName("input"),this.replayCb=e.getElementsByClassName("oe-r-cb")[0],t[0].addEventListener("click",this.onDrawClick,!1),t[1].addEventListener("click",this.onCancel,!1))},onDrawClick:function(){var e,t,n=this.parentNode.getElementsByTagName("input");e=+n[0].value,t=+n[1].value,e<1||t<1||(window.Keybinds&&(Keybinds.enabled=!1),Tegaki.open({onDone:PainterCore.onDone,onCancel:PainterCore.onCancel,saveReplay:PainterCore.replayCb&&PainterCore.replayCb.checked,width:e,height:t}))},replay:function(e){e=+e,Tegaki.open({replayMode:!0,replayURL:"//i.4cdn.org/"+location.pathname.split(/\//)[1]+"/"+e+".tgkr"})},b64toBlob:function(e){var t,n,o,a,i;for(i=(n=atob(e)).length,o=new Array(i),t=0;t<i;++t)o[t]=n.charCodeAt(t);return a=new Uint8Array(o),new Blob([a])},onDone:function(){var e,t;e=PainterCore,window.Keybinds&&(Keybinds.enabled=!0),e.btnFile.disabled=!0,e.btnClear.disabled=!1,e.data=Tegaki.flatten().toDataURL("image/png"),Tegaki.saveReplay&&(e.replayBlob=Tegaki.replayRecorder.toBlob()),!Tegaki.hasCustomCanvas&&Tegaki.startTimeStamp?e.time=Math.round((Date.now()-Tegaki.startTimeStamp)/1e3):e.time=0,e.btnFile.style.visibility="hidden",e.btnDraw.textContent="Edit";for(t of e.inputNodes)t.disabled=!0;document.forms.post.addEventListener("submit",e.onSubmit,!1)},onCancel:function(){var e=PainterCore;window.Keybinds&&(Keybinds.enabled=!0),e.data=null,e.replayBlob=null,e.time=0,e.btnFile.disabled=!1,e.btnClear.disabled=!0,e.btnFile.style.visibility="",e.btnDraw.textContent="Draw";for(var t of e.inputNodes)t.disabled=!1;document.forms.post.removeEventListener("submit",e.onSubmit,!1)},onSubmit:function(e){var t,n,o;e.preventDefault(),t=new FormData(this),(n=PainterCore.b64toBlob(PainterCore.data.slice(PainterCore.data.indexOf(",")+1)))&&(t.append("upfile",n,"tegaki.png"),PainterCore.replayBlob&&t.append("oe_replay",PainterCore.replayBlob,"tegaki.tgkr")),t.append("oe_time",PainterCore.time),(o=new XMLHttpRequest).open("POST",this.action,!0),o.withCredentials=!0,o.onerror=PainterCore.onSubmitError,o.onload=PainterCore.onSubmitDone,o.send(t),PainterCore.btnSubmit.disabled=!0},onSubmitError:function(){PainterCore.btnSubmit.disabled=!1,showPostFormError("Connection Error.")},onSubmitDone:function(){var e,t,n,o,a;if(PainterCore.btnSubmit.disabled=!1,t=this.responseText.match(/<!-- thread:([0-9]+),no:([0-9]+) -->/))return n=+t[1],o=+t[2],n||(n=o),a=location.pathname.split(/\//)[1],window.location.href="/"+a+"/thread/"+n+"#p"+o,PainterCore.onCancel(),void(n!=o&&(PainterCore.btnClear.disabled=!0,window.location.reload()));(e=this.responseText.match(/"errmsg"[^>]*>(.*?)<\/span/))&&showPostFormError(e[1])}};initPass(),window.onload=init,window.clickable_ids&&document.addEventListener("4chanParsingDone",onParsingDone,!1),document.addEventListener("4chanMainInit",loadExtraScripts,!1),document.addEventListener("DOMContentLoaded",contentLoaded,!0),initStyleSheet();