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

1 line
No EOL
21 KiB
JavaScript

!function(){var e={cacheTTL:6e4,autoRefreshDelay:12e4,autoRefreshTimeout:null};e.initVisibilityAPI=function(){this.hidden="hidden",this.visibilitychange="visibilitychange","undefined"==typeof document.hidden&&("mozHidden"in document?(this.hidden="mozHidden",this.visibilitychange="mozvisibilitychange"):"webkitHidden"in document?(this.hidden="webkitHidden",this.visibilitychange="webkitvisibilitychange"):"msHidden"in document&&(this.hidden="msHidden",this.visibilitychange="msvisibilitychange")),document.addEventListener(this.visibilitychange,this.onVisibilityChange,!1)},e.init=function(){var n,o;e.initVisibilityAPI(),(n=document.createElement("div")).className="extPanel reply",n.id="adminToolbox",n.setAttribute("data-trackpos","AT-position"),Config["AT-position"]?n.style.cssText=Config["AT-position"]:(n.style.right="10px",n.style.top="380px"),n.style.position=Config.fixedAdminToolbox?"fixed":"",o='<div class="drag" id="atHeader">Janitor Tools<img alt="Refresh" title="Refresh" src="'+Main.icons.refresh+'" id="atRefresh" data-cmd="at-refresh" class="pointer right"></div><h4><a href="https://'+t.reportsSubDomain+'.4chan.org/" target="_blank">Reports</a>: <span title="Total" id="at-total">?</span> (<span title="Illegal" id="at-illegal">?</span>)</h4><h4 id="at-msg-cnt"><a data-cmd="at-msg" href="https://'+t.reportsSubDomain+'.4chan.org/?action=staffmessages" target="_blank">Messages</a>: <span id="at-msg">?</span></h4>',n.innerHTML=o,document.body.appendChild(n),e.refreshReportCount(),Draggable.set($.id("atHeader"))},e.onVisibilityChange=function(){var t;t=e,document[e.hidden]?(clearInterval(t.autoRefreshTimeout),t.autoRefreshTimeout=null):(t.refreshReportCount(),t.autoRefreshTimeout=setInterval(t.refreshReportCount,t.autoRefreshDelay))},e.refreshReportCount=function(n){var o,i;if(!0!==n&&(i=localStorage.getItem("4chan-cache-rc"))&&(i=JSON.parse(i)).ts>Date.now()-e.cacheTTL)return $.id("at-total").textContent=i.data[0],$.id("at-illegal").textContent=i.data[1],$.id("at-msg-cnt").style.display=i.data[2]?"block":"",void($.id("at-msg").textContent=i.data[2]||0);(o=new XMLHttpRequest).open("GET","https://"+t.reportsSubDomain+".4chan.org/H429f6uIsUqU.php",!0),o.withCredentials=!0,o.onload=function(){var e,t,n,o;if(200==this.status){try{t=JSON.parse(this.responseText)}catch(i){return void console.log(i)}if("success"!==t.status)return void console.log(t.message);o=(n=t.data).msg||0,$.id("at-msg-cnt").style.display=o?"block":"",$.id("at-msg").textContent=o,$.id("at-total").textContent=n.total,$.id("at-illegal").textContent=n.illegal,e={ts:Date.now(),data:[n.total,n.illegal,o]},e=JSON.stringify(e),localStorage.setItem("4chan-cache-rc",e),document.dispatchEvent(new CustomEvent("4chanATUpdated"))}else this.onerror()},o.onerror=function(){console.log("Error while refreshing the report count (Status: "+this.status+").")},o.onloadend=function(){$.id("atRefresh").src=Main.icons.refresh},$.id("atRefresh").src=Main.icons.rotate,o.send(null)},e.resetMsgCount=function(){var e;$.id("at-msg").textContent=0,(e=localStorage.getItem("4chan-cache-rc"))&&((e=JSON.parse(e)).data[2]=0,e=JSON.stringify(e),localStorage.setItem("4chan-cache-rc",e))};var t={nextChunkIndex:0,nextChunk:null,chunkSize:100,reportsSubDomain:"reports"};t.initIconsCatalog=function(){var e,t,n;if(Main.icons={up:"arrow_up.png",down:"arrow_down.png",right:"arrow_right.png",download:"arrow_down2.png",refresh:"refresh.png",cross:"cross.png",gis:"gis.png",iqdb:"iqdb.png",minus:"post_expand_minus.png",plus:"post_expand_plus.png",rotate:"post_expand_rotate.gif",quote:"quote.png",report:"report.png",notwatched:"watch_thread_off.png",watched:"watch_thread_on.png",help:"question.png"},t={yotsuba_new:"futaba/",futaba_new:"futaba/",yotsuba_b_new:"burichan/",burichan_new:"burichan/",tomorrow:"tomorrow/",photon:"photon/"},n="//s.4cdn.org/image/",window.devicePixelRatio>=2)for(e in Main.icons)Main.icons[e]=Main.icons[e].replace(".","@2x.");n+="buttons/"+t[Main.stylesheet];for(e in Main.icons)Main.icons[e]=n+Main.icons[e]},t.apiUrlFilter=function(e){return e+"?"+Math.round(Date.now()/1e3/3)},t.openDeletePrompt=function(e){var n,o;n='<div class="extPanel reply"><div class="panelHeader">Delete Post No.'+(e=e.getAttribute("data-id"))+'<span class="panelCtrl"><img alt="Close" title="Close" class="pointer" data-cmd="close-delete-prompt" src="'+Main.icons.cross+'"></a></span></div><span id="delete-prompt-inner"><input type="button" value="Delete Post" tabindex="-1" data-cmd="delete-post" data-id="'+e+'"> <input type="button" value="Delete Image Only" data-cmd="delete-image" data-id="'+e+'">',(o=document.createElement("div")).className="UIPanel",o.id="delete-prompt",o.innerHTML=n,o.addEventListener("click",t.closeDeletePrompt,!1),document.body.appendChild(o),$.id("delete-prompt-inner").firstElementChild.focus()},t.closeDeletePrompt=function(e){var n;e&&"delete-prompt"!=e.target.id||(n=$.id("delete-prompt"))&&(n.removeEventListener("click",t.closeDeletePrompt,!1),document.body.removeChild(n))},t.deletePost=function(e,n){var o,i,a,s,r,d,l,c;o=e.getAttribute("data-id"),c=$.id("t"+o),a=new FormData,r="https://sys."+$L.d(Main.board)+"/"+Main.board+"/post",d=window.thread_archived?"arcdel":"usrdel",n&&("Delete Image No.",a.append("onlyimgdel","on")),a.append(o,"delete"),a.append("mode",d),a.append("pwd","janitorise"),(l=$.id("delete-prompt-inner")).textContent="Deleting...",(i=new XMLHttpRequest).open("POST",r),i.withCredentials=!0,i.onload=function(){if(e.src=Main.icons.cross,200==this.status)if(-1!=this.responseText.indexOf("Updating")){if(n)(s=$.id("f"+o)).innerHTML='<span class="fileThumb"><img alt="File deleted." src="//s.4cdn.org/image/filedeleted'+(c?"":"-res")+'.gif"></span>';else{if(o==Main.tid)return void(location.href="//boards."+$L.d(Main.board)+"/"+Main.board+"/");c?((s=c.parentNode).removeChild(c.nextElementSibling),s.removeChild(c)):(s=$.id("pc"+o)).parentNode.removeChild(s)}t.closeDeletePrompt()}else l.textContent="Error: Post might have already been deleted, or is a sticky.";else l.textContent="Error: Wrong status while deleting No."+o+" (Status: "+this.status+")."},i.onerror=function(){l.textContent="Error: Error while deleting No."+o+" (Status: "+this.status+")."},i.send(a)},t.openBanReqWindow=function(e){var t;t=e.getAttribute("data-id"),window.open("https://sys."+$L.d(Main.board)+"/"+Main.board+"/admin?mode=admin&admin=banreq&id="+t,"_blank","scrollBars=yes,resizable=no,toolbar=no,menubar=no,location=no,directories=no,width=400,height=245")},t.openBanReqFrame=function(e){var n;this.banReqCnt&&this.close(),n=e.getAttribute("data-id"),this.banReqCnt=document.createElement("div"),this.banReqCnt.id="banReq",this.banReqCnt.className="extPanel reply",this.banReqCnt.setAttribute("data-trackpos","banReq-position"),Config["banReq-position"]?this.banReqCnt.style.cssText=Config["banReq-position"]:(this.banReqCnt.style.right="0px",this.banReqCnt.style.top="50px"),this.banReqCnt.innerHTML='<div id="banReqHeader" class="drag postblock">Ban Request No.'+n+'<img alt="X" src="'+Main.icons.cross+'" id="banReqClose" class="extButton" title="Close Window"></div><iframe src="https://sys.'+$L.d(Main.board)+"/"+Main.board+"/admin?mode=admin&admin=banreq&id="+n+'&noheader=true" width="400" height="230" frameborder="0"></iframe>',document.body.appendChild(this.banReqCnt),window.addEventListener("message",t.onMessage,!1),document.addEventListener("keydown",t.onKeyDown,!1),$.id("banReqClose").addEventListener("click",t.closeBanReqFrame,!1),Draggable.set($.id("banReqHeader"))},t.closeBanReqFrame=function(){window.removeEventListener("message",t.onMessage,!1),document.removeEventListener("keydown",t.onKeyDown,!1),Draggable.unset($.id("banReqHeader")),$.id("banReqClose").removeEventListener("click",t.closeBanReqFrame,!1),document.body.removeChild(t.banReqCnt),t.banReqCnt=null},t.processMessage=function(e){return e?{cmd:(e=e.split("-"))[0],type:e[1],id:e.slice(2).join("-")}:{}},t.onKeyDown=function(e){27!=e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||t.closeBanReqFrame()},t.onMessage=function(e){var n;e.origin==="https://sys."+$L.d(Main.board)&&"ban"===(n=t.processMessage(e.data)).type&&("done"!==n.cmd&&"cancel"!==n.cmd||t.closeBanReqFrame())},t.onClick=function(n){var o,i;if((o=n.target)!=document&&(i=o.getAttribute("data-cmd")))switch(i){case"at-refresh":e.refreshReportCount(!0);break;case"delete-post":case"delete-image":t.deletePost(o,"delete-image"===i);break;case"open-delete-prompt":t.openDeletePrompt(o);break;case"close-delete-prompt":t.closeDeletePrompt();break;case"open-banreq-prompt":Config.inlinePopups?t.openBanReqFrame(o):t.openBanReqWindow(o);break;case"at-msg":e.resetMsgCount();break;case"toggle-file-spoiler":t.setFileSpoiler(o);break;case"prompt-spoiler":confirm("Toggle spoiler?")&&t.setFileSpoiler(o);break;case"boardlist-open":t.openBoardList();break;case"boardlist-close":t.closeBoardList();break;case"boardlist-save":t.saveBoardList(),t.closeBoardList()}},t.onScroll=function(){for(var e;t.nextChunk.offsetTop<document.documentElement.clientHeight+window.scrollY;){if((e=t.nextChunkIndex+t.chunkSize)>=t.postCount)return t.parseRange(t.nextChunkIndex,t.postCount),window.removeEventListener("scroll",t.onScroll,!1),!1;t.parseRange(t.nextChunkIndex,e)}return!0},t.parseRange=function(e,n){var o,i,a;for(a=document.getElementById("t"+Main.tid).getElementsByClassName("postInfo"),o=e;o<n&&(i=a[o]);++o)t.parsePost(i);t.nextChunkIndex=o,t.nextChunk=a[o]},t.onParsingDone=function(e){var n,o,i,a,s;if(Config.useIconButtons)for(e?(o=e.detail.threadId,i=e.detail.offset,a=e.detail.limit,s=document.getElementById("t"+o).getElementsByClassName("postInfo")):(i=0,a=(s=document.getElementsByClassName("postInfo")).length),n=i;n<a;++n)t.parsePost(s[n])},t.onPostMenuReady=function(e){var t,n,o,i;n=e.detail.postId,o=e.detail.node,(t=document.createElement("li")).className="dd-admin",t.setAttribute("data-cmd","open-delete-prompt"),t.setAttribute("data-id",n),t.textContent="Delete",o.appendChild(t),window.spoilers&&(t=$.id("fT"+n))&&(i=$.cls("imgspoiler",t.parentNode)[0]?0:1,(t=document.createElement("li")).className="dd-admin",t.setAttribute("data-cmd","toggle-file-spoiler"),t.setAttribute("data-id",n),t.setAttribute("data-flag",i),t.textContent=(i?"Set":"Unset")+" Spoiler",o.appendChild(t)),window.thread_archived||((t=document.createElement("li")).className="dd-admin",t.setAttribute("data-cmd","open-banreq-prompt"),t.setAttribute("data-id",n),t.textContent="Ban request",o.appendChild(t))},t.parsePost=function(e){var n,o,i,a;o='<img class="extButton" alt="X" data-cmd="open-delete-prompt" data-id="'+(n=e.id.slice(2))+'" src="'+Main.icons.cross+'" title="Delete">',window.spoilers&&(el=$.id("fT"+n))&&(o+='<img class="extButton" alt="S" data-cmd="prompt-spoiler" data-id="'+n+'" src="'+t.icons.spoiler+'" title="Toggle Spoiler">'),window.thread_archived||(o+='<img class="extButton" alt="B" data-cmd="open-banreq-prompt" data-id="'+n+'" src="'+t.icons.ban+'" title="Ban Request">'),(i=document.createElement("div")).className="extControls",i.innerHTML=o,a=e.getElementsByClassName("postMenuBtn")[0],e.insertBefore(i,a)},t.displayJCount=function(e,t,n,o){var i;$.addClass(e,"j-newposts"),$.addClass(t,"j-newposts"),e.setAttribute("data-no",n),t.setAttribute("data-no",n),e.textContent=t.textContent="j +"+o,i=o+" new post"+(o>1?"s":""),Main.addTooltip(e,i,"j-tooltip"),Main.addTooltip(t,i,"j-tooltip-bot")},t.refreshJCount=function(){var e,n,o,i;n=$.id("j-link"),o=$.id("j-link-bot"),n&&o&&(n=n.firstElementChild,o=o.firstElementChild,(e=localStorage.getItem("4chan-j-count"))&&(e=JSON.parse(e)),!e||Date.now()-e.time>=1e4?((i=new XMLHttpRequest).open("GET","https://sys.4chan.org/j/1mcQTXbjW5WO.php?&"+Date.now()),i.withCredentials=!0,i.onloadend=function(){var i,a,s;200==this.status||304==this.status?(i=JSON.parse(this.responseText),e&&"j"!=Main.board?i.no>e.no&&(s=i.no-e.no,t.displayJCount(n,o,i.no,s),a={time:Date.now(),no:e.no,delta:s}):a={time:Date.now(),no:i.no},a&&localStorage.setItem("4chan-j-count",JSON.stringify(a))):console.log("Error: Could not load /j/ post count (Status: "+this.status+").")},i.send(null)):e.delta&&t.displayJCount(n,o,e.no,e.delta))},t.clearJCount=function(){var e,t,n,o;n=$.id("j-tooltip"),o=$.id("j-tooltip-bot"),n&&(t=this.getAttribute("data-no"),e={time:Date.now(),no:t},localStorage.setItem("4chan-j-count",JSON.stringify(e)),n.parentNode.removeChild(n),o.parentNode.removeChild(o),setTimeout(function(){var e=$.cls("j-newposts");e[0]&&(e[0].textContent="j",$.removeClass(e[0],"j-newposts"),e[0].textContent="j",$.removeClass(e[0],"j-newposts"))},10))},t.icons={ban:"ban.png",spoiler:"s.png"},t.initIcons=function(){var e,n;if(n="//s.4cdn.org/image/buttons/"+{yotsuba_new:"futaba/",futaba_new:"futaba/",yotsuba_b_new:"burichan/",burichan_new:"burichan/",tomorrow:"tomorrow/",photon:"photon/"}[Main.stylesheet],window.devicePixelRatio>=2)for(e in t.icons)t.icons[e]=t.icons[e].replace(".","@2x.");for(e in t.icons)t.icons[e]=n+t.icons[e]},t.initNavLinks=function(){var e,n,o;n=$.id("navtopright"),o=$.id("navbotright"),(e=document.createElement("span")).id="j-link",e.innerHTML='[<a href="https://sys.4chan.org/j/" title="Janitor &amp; Moderator Discussion">j</a>]',e.firstElementChild.addEventListener("mouseup",t.clearJCount,!1),n.parentNode.insertBefore(e,n),(e=e.cloneNode(!0)).id="j-link-bot",e.firstElementChild.addEventListener("mouseup",t.clearJCount,!1),o.parentNode.insertBefore(e,o),t.refreshJCount()},t.openBoardList=function(){var e;$.id("boardList")||((e=document.createElement("div")).id="boardList",e.className="UIPanel",e.setAttribute("data-cmd","boardlist-close"),e.innerHTML='<div class="extPanel reply"><div class="panelHeader">Boards<span class="panelCtrl"><img alt="Close" title="Close" class="pointer" data-cmd="boardlist-close" src="'+Main.icons.cross+'"></a></span></div><input placeholder="Example: jp tg mu or all" id="boardListBox" type="text" value="'+(localStorage.getItem("4chan-boardlist")||"")+'"><div class="center"><button id="boardListSave" data-cmd="boardlist-save">Save</button></div></td></tr></tfoot></table></div>',document.body.appendChild(e),e.addEventListener("click",this.onClick,!1))},t.saveBoardList=function(){var e;(e=$.id("boardListBox"))&&localStorage.setItem("4chan-boardlist",e.value)},t.closeBoardList=function(){var e;(e=$.id("boardList"))&&(e.removeEventListener("click",this.onClick,!1),document.body.removeChild(e))},t.setFileSpoiler=function(e){var n,o,i,a;o=e.getAttribute("data-id"),i=e.getAttribute("data-flag"),o&&(a=$.id("f"+o),i||(i=$.cls("imgspoiler",a.parentNode)[0]?0:1),a&&!a.hasAttribute("data-processing")&&((n=new XMLHttpRequest).open("GET","https://sys."+$L.d(Main.board)+"/"+Main.board+"/admin.php?admin=spoiler&pid="+o+"&flag="+i,!0),n.withCredentials=!0,n.onload=t.onFileSpoilerLoad,n.onerror=t.onFileSpoilerError,n._pid=+o,n._flag=+i,Feedback.notify("Processing...",null),a.setAttribute("data-processing","1"),n.send(null)))},t.onFileSpoilerLoad=function(){var e,t;Feedback.hideMessage(),"1"===this.responseText?(e=$.id("f"+this._pid))&&(e.removeAttribute("data-processing"),(e=$.cls("fileThumb",e)[0])&&(this._flag?($.addClass(e,"imgspoiler"),(t=e.previousElementSibling).setAttribute("title",t.firstElementChild.textContent),Config.revealSpoilers||((e=$.tag("img",e)[0]).style.width=e.style.height="100px",e.src="//s.4cdn.org/image/spoiler-"+Main.board+".png")):(Config.revealSpoilers||Parser.revealImageSpoiler(e),$.removeClass(e,"imgspoiler")))):"-1"===this.responseText?Feedback.error("You are not logged in"):Feedback.error("Couldn't set spoiler flag for post No."+this._pid)},t.onFileSpoilerError=function(){var e;(e=$.id("f"+this._pid))&&(e.removeAttribute("data-processing"),Feedback.error("Couldn't update the spoiler flag for post No."+this.pid))},t.initCatalog=function(){window.Main={board:location.pathname.split(/\//)[1]},window.Main.addTooltip=function(e,t,n){var o,i;return(o=document.createElement("div")).className="click-me",n&&(o.id=n),o.innerHTML=t||"Change your settings",e.parentNode.appendChild(o),i=(e.offsetWidth-o.offsetWidth+e.offsetLeft-o.offsetLeft)/2,o.style.marginLeft=i+"px",o},(t.stylesheet=t.getCookie(window.style_group))?t.stylesheet=t.stylesheet.toLowerCase().replace(/ /g,"_"):t.stylesheet="nws_style"==style_group?"yotsuba_new":"yotsuba_b_new",Main.stylesheet=t.stylesheet,t.initIconsCatalog(),t.addCss(),document.addEventListener("click",t.onClick,!1),t.runCatalog()},t.runCatalog=function(){var n;t.initNavLinks(),FC.hasMobileLayout||e.init(),n=$.id("threads"),$.on(n,"mouseover",t.onThreadMouseOver)},t.init=function(){Config.boardList=!0,SettingsMenu.options.Janitor={boardList:['Janitor Boards [<a href="javascript:;" data-cmd="boardlist-open">Select</a>]',"Select boards to enable janitor buttons on",!0],useIconButtons:["Use icon buttons","Display old-style buttons instead of using drop-down"],changeUpdateDelay:["Reduce auto-update delay","Reduce the thread updater delay",!0],fixedAdminToolbox:["Pin Janitor Tools to the page","Janitor Tools will scroll with you"],inlinePopups:["Inline ban request panel","Open ban request panel in browser window, instead of a popup"],disableMngExt:["Disable janitor extension","Completely disable the janitor extension (overrides any checked boxes)",!0]},Config.disableMngExt||(t.addCss(),Config.useIconButtons&&t.initIcons(),QR.noCooldown=QR.noCaptcha=!0,document.addEventListener("click",t.onClick,!1),document.addEventListener("DOMContentLoaded",t.run,!1))},t.run=function(){var n,o,i,a;document.removeEventListener("DOMContentLoaded",t.run,!1),t.initNavLinks(),Main.hasMobileLayout||e.init(),Config.revealSpoilers&&$.addClass(document.body,"reveal-img-spoilers"),Config.threadUpdater&&Main.tid&&Config.changeUpdateDelay&&(ThreadUpdater.delayIdHidden=3,ThreadUpdater.delayRange=[5,10,15,20,30,60],ThreadUpdater.apiUrlFilter=t.apiUrlFilter),n=localStorage.getItem("4chan-boardlist")||"","j"==Main.board||"all"!=n&&-1==n.split(/[, ]+/).indexOf(Main.board)||(Config.useIconButtons&&!Main.hasMobileLayout&&(Main.tid?(o=document.getElementById("t"+Main.tid).getElementsByClassName("postInfo"),t.postCount=o.length,t.postCount>t.chunkSize?(t.nextChunk=o[0],window.addEventListener("scroll",t.onScroll,!1),t.onScroll()):t.onParsingDone()):t.onParsingDone(),document.addEventListener("4chanParsingDone",t.onParsingDone,!1)),document.addEventListener("4chanPostMenuReady",t.onPostMenuReady,!1)),(i=$.id("boardSelectMobile"))&&((a=document.createElement("option")).value="j",a.textContent="/j/ - Janitors & Moderators",i.insertBefore(a,i.firstElementChild))},t.getCookie=function(e){var t,n,o,i;for(i=e+"=",o=document.cookie.split(";"),t=0;n=o[t];++t){for(;" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(i))return decodeURIComponent(n.substring(i.length,n.length))}return null},t.addCss=function(){var e,t;t='#adminToolbox { max-width: 256px; display: block; position: absolute; padding: 3px;}#adminToolbox h4 { font-size: 12px; margin: 2px 0 0; padding: 0; font-weight: normal;}#adminToolbox li { list-style: none;}#adminToolbox ul { padding: 0; margin: 2px 0 0 10px;}#atHeader { height: 17px; font-weight: bold; padding-bottom: 2px;}#atRefresh { margin: -1px 0 0 3px;}.post-ip { margin-left: 5px;}#delete-prompt > div { text-align: center;}#watchList li:first-child { margin-top: 3px; padding-top: 2px; border-top: 1px solid rgba(0, 0, 0, 0.20);}.photon #atHeader { border-bottom: 1px solid #ccc;}.yotsuba_new #atHeader { border-bottom: 1px solid #d9bfb7;}.yotsuba_b_new #atHeader { border-bottom: 1px solid #b7c5d9;}.tomorrow #atHeader { border-bottom: 1px solid #111;}#at-illegal { color: red;}#at-msg-cnt { display: none;}.j-newposts { font-weight: bold !important;}#j-link,#j-link-bot { margin-right: 3px; display: inline-block; margin-left: 3px;}#boardList input { width: 385px; margin: auto; display: block;}#boardListSave { margin-top: 5px;}#banReqClose { float: right;}#banReq iframe { overflow: hidden;}#banReq { display: block; position: fixed; padding: 2px; font-size: 10pt; height: 250px;}#banReqHeader { text-align: center; margin-bottom: 1px; padding: 0; height: 18px; line-height: 18px;}#captchaFormPart { display: none;}.mobileExtControls { float: right; font-size: 11px; margin-bottom: 3px;}.ws .mobileExtControls { color: #34345C;}.nws .mobileExtControls { color: #0000EE;}.reply .mobileExtControls { margin-right: 5px;}.mobileExtControls span { margin-left: 10px;}.mobileExtControls span:after { content: "]";}.mobileExtControls span:before { content: "[";}.nws .mobileExtControls span:after { color: #800000;}.nws .mobileExtControls span:before { color: #800000;}.ws .mobileExtControls span:after { color: #000;}.ws .mobileExtControls span:before { color: #000;}.m-dark .mobileExtControls,.m-dark .mobileExtControls span:after,.m-dark .mobileExtControls span:before { color: #707070 !important;}.dd-admin { text-indent: 5px;}.dd-admin:before { color: #FF0000; content: "\u2022"; left: -3px; position: absolute;}.extPanel { border: 1px solid rgba(0, 0, 0, 0.2);}.extPanel img.pointer { width: 18px; height: 18px }.drag { -moz-user-select: none !important; cursor: move !important;}.reveal-img-spoilers .imgspoiler::before { content: " "; width:0.75em; height:0.75em; border-radius: 0.5em; position: absolute; display: block; background: red; margin-top: 1px; margin-left: 1px; pointer-events: none;}.reveal-img-spoilers.is_catalog .imgspoiler::before { margin-top: 4px; margin-left: 12px;}.reveal-img-spoilers .imgspoiler:hover::before { background: #fff; }',(e=document.createElement("style")).setAttribute("type","text/css"),e.textContent=t,document.head.appendChild(e)},/https?:\/\/boards\.(?:4chan|4channel)\.org\/[a-z0-9]+\/catalog($|#.*$)/.test(location.href)?t.initCatalog():t.init()}();