Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function(){var b={colours:{},posterids:{},nextChunkIndex:0,nextChunk:null,chunkSize:100,sameIDActive:!1,flags:[]},p={},q={},r=[];b.openDeletePrompt=function(a){var d;a=a.getAttribute("data-id");a='<div class="extPanel reply"><div class="panelHeader">Delete Post No.'+a+'<span><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="'+
- a+'"> <input type="button" value="Delete Image Only" data-cmd="delete-image" data-id="'+a+'"><br>[<input type="checkbox" id="delete-all-by-ip"><label for="delete-all-by-ip">Delete all by IP?</label>]</span></div>';d=document.createElement("div");d.className="UIPanel";d.id="delete-prompt";d.innerHTML=a;document.addEventListener("keydown",b.onKeyDown,!1);d.addEventListener("click",b.closeDeletePrompt,!1);document.body.appendChild(d);$.id("delete-prompt-inner").firstElementChild.focus()};b.loadSamePosters=function(a){var d,c;d="https://sys.4chan.org/"+Main.board+"/admin?admin=adminext&thread="+Main.tid;a&&(d+="&from="+a);xhr=new XMLHttpRequest;xhr.open("GET",d);xhr.withCredentials=!0;xhr.onload=function(){if(200==this.status||304==this.status){var a=JSON.parse(this.responseText),d,f,k,h,l;if(a)for(k in b.sameIDActive||(b.sameIDActive=!0),a)f=a[k],p[f]||(p[f]=b.get_random_light_color(),r.push(f),q[f]=0),d=p[f],h=r.indexOf(f)+1,l=++q[f],$.id("p"+k).getAttribute("style")&&/background-color/.test($.id("p"+
- k).getAttribute("style"))||$.id("t"+k)||(f=1===h?" (OP) ":" ",$.id("p"+k).setAttribute("style","background-color: "+d),c=document.createElement("div"),c.setAttribute("style","text-align: right; font-weight: bold; color: white; font-size: 20px; text-shadow: -2px 0 1px rgba(0,0,0,0.2), 0 2px 1px rgba(0,0,0,0.2), 2px 0 1px rgba(0,0,0,0.2), 0 -2px 1px rgba(0,0,0,0.2); margin-top: -25px; margin-right: 3px;"),c.innerHTML="#"+h+f+"("+l+")",$.id("p"+k).appendChild(c))}};xhr.send(null)};b.closeDeletePrompt=function(a){if(!a||"delete-prompt"==a.target.id)if(a=$.id("delete-prompt"))document.removeEventListener("keydown",b.onKeyDown,!1),a.removeEventListener("click",b.closeDeletePrompt,!1),document.body.removeChild(a)};b.checkDeletedPosts=function(){var a;Main.tid&&(a="//a.4cdn.org/"+Main.board+"/res/"+Main.tid+".json",xhr=new XMLHttpRequest,xhr.open("GET",a),xhr.onload=function(){var a;if(200==this.status||304==this.status)a=Parser.parseThreadJSON(this.responseText),ThreadUpdater.markDeletedReplies(a)},xhr.send(null))};b.get_random_light_color=function(){for(var a=["A","B","C","D","E"],d="#",b=0;3>b;b++)d+=a[Math.floor(Math.random()*a.length)];return d};b.deletePost=function(a,d){var c,e,g,f,h,m,l,n;c=a.getAttribute("data-id");n=$.id("t"+c);g=new FormData;h="https://sys.4chan.org/"+Main.board;e="usrdel";if(m=$.id("delete-all-by-ip").checked)e="admin.php",g.append("admin","delall"),g.append("id",c);h=m?h+"/admin":h+("f"==Main.board?"/up.php":"/delete.php");d&&g.append("onlyimgdel","on");g.append(c,"delete");g.append("mode",e);g.append("pwd","janitorise");(l=$.id("delete-prompt-inner")).textContent="Deleting...";e=new XMLHttpRequest;e.open("POST",h);e.withCredentials=!0;e.onload=function(){var e;a.src=Main.icons.cross;if(200==this.status)if(!m&&-1!=this.responseText.indexOf("Updating")||m&&-1!=this.responseText.indexOf("deleted")){if(d)f=$.id("f"+c),f.innerHTML='<span class="fileThumb"><img alt="File deleted." src="//s.4cdn.org/image/filedeleted'+(n?"":"-res")+'.gif"></span>',m&&(e=document.createElement("span"),e.innerHTML='<br><br><strong style="font-color: red;">(YOU HAVE DELETED ALL IMAGES BY THIS IP)</strong>',f=$.id("m"+c),f.appendChild(e));else{if(c==Main.tid){location.href="//boards.4chan.org/"+Main.board+"/";return}m?(e=document.createElement("span"),e.innerHTML='<br><br><strong style="font-color: red;">(YOU HAVE DELETED ALL POSTS BY THIS IP)</strong>',f=$.id("m"+c),f.appendChild(e),b.checkDeletedPosts()):n?(f=n.parentNode,f.removeChild(n.nextSibling),f.removeChild(n)):(f=$.id("pc"+c),f.parentNode.removeChild(f))}b.closeDeletePrompt()}else l.textContent="Error: Post might have already been deleted, or is a sticky.";else l.textContent="Error: Wrong status while deleting No."+c+" (Status: "+this.status+")."};e.onerror=function(){l.textContent="Error: Error while deleting No."+c+" (Status: "+this.status+")."};e.send(g)};b.deleteCatThread=function(a,d){var b,e,g,f,h;confirm(d?"Delete image only?":"Delete thread?")&&(b=a.getAttribute("data-id"),h="https://sys.4chan.org/"+Main.board+"/delete.php",g=new FormData,d&&g.append("onlyimgdel","on"),g.append(b,"delete"),g.append("mode","usrdel"),g.append("pwd","janitorise"),e=new XMLHttpRequest,e.open("POST",h),e.withCredentials=!0,e.onload=function(){200==this.status?-1!=this.responseText.indexOf("Updating")?(f=d?$.id("thumb-"+b):$.id("thread-"+b),$.addClass(f,"disabled")):console.log("Error while deleting thread "+b):console.log("Error while deleting thread "+b+"("+this.status+")")},e.onerror=function(){console.log("Error while deleting thread "+b+"("+this.status+")")},e.send(g))};b.openBanWindow=function(a){a=a.getAttribute("data-id");window.open("https://sys.4chan.org/"+Main.board+"/admin?mode=admin&admin=ban&id="+a,"_blank","scrollBars=yes,resizable=no,toolbar=no,menubar=no,location=no,directories=no,width=400,height=490")};b.openBanFrame=function(a){this.banReqCnt&&this.closeBanFrame();a=a.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 No.'+a+'<img alt="X" src="'+Main.icons.cross+'" id="banReqClose" class="extButton" title="Close Window"></div><iframe src="https://sys.4chan.org/'+Main.board+"/admin?mode=admin&admin=ban&id="+a+'&noheader=true" width="400" height="400" frameborder="0"></iframe>';document.body.appendChild(this.banReqCnt);window.addEventListener("message",b.onMessage,!1);document.addEventListener("keydown",b.onKeyDown,!1);$.id("banReqClose").addEventListener("click",b.closeBanFrame,!1);Draggable.set($.id("banReqHeader"))};b.closeBanFrame=function(){window.removeEventListener("message",b.onMessage,!1);document.removeEventListener("keydown",b.onKeyDown,!1);Draggable.unset($.id("banReqHeader"));$.id("banReqClose").removeEventListener("click",b.closeBanFrame,!1);document.body.removeChild(b.banReqCnt);b.banReqCnt=null};b.processMessage=function(a){if(!a)return{};a=a.split("-");return{cmd:a[0],type:a[1],id:a.slice(2).join("-")}};b.onKeyDown=function(a){27!=a.keyCode||a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(b.banReqCnt&&b.closeBanFrame(),b.threadOptsCnt&&b.closeThreadOptionsFrame(),$.id("delete-prompt")&&b.closeDeletePrompt())};b.onMessage=function(a){"https://sys.4chan.org"===a.origin&&(a=b.processMessage(a.data),"ban"===a.type&&("done"!==a.cmd&&"cancel"!==a.cmd||b.closeBanFrame()))};b.openThreadOptions=function(a){a=a.getAttribute("data-id");window.open("https://sys.4chan.org/"+Main.board+"/admin?mode=admin&admin=opt&id="+a,"_blank","scrollBars=yes,resizable=no,toolbar=no,menubar=no,location=no,directories=no,width=400,height=220")};b.openThreadOptionsFrame=function(a){this.threadOptsCnt&&this.closeThreadOptionsFrame();a=a.getAttribute("data-id");this.threadOptsCnt=document.createElement("div");this.threadOptsCnt.id="threadOpts";this.threadOptsCnt.className="extPanel reply";this.threadOptsCnt.setAttribute("data-trackpos","threadOpts-position");Config["threadOpts-position"]?this.threadOptsCnt.style.cssText=Config["threadOpts-position"]:(this.threadOptsCnt.style.right="0px",this.threadOptsCnt.style.top="50px");this.threadOptsCnt.innerHTML='<div id="threadOptsHeader" class="drag postblock">Thread Options No.'+a+'<img alt="X" src="'+Main.icons.cross+'" id="threadOptsClose" class="extButton" title="Close Window"></div><iframe src="https://sys.4chan.org/'+Main.board+"/admin?mode=admin&admin=opt&id="+a+'&noheader=true" width="400" height="120" frameborder="0"></iframe>';document.body.appendChild(this.threadOptsCnt);window.addEventListener("message",b.onThreadOptsDone,!1);document.addEventListener("keydown",b.onKeyDown,!1);$.id("threadOptsClose").addEventListener("click",b.closeThreadOptionsFrame,!1);Draggable.set($.id("threadOptsHeader"))};b.closeThreadOptionsFrame=function(){window.removeEventListener("message",b.onThreadOptsDone,!1);document.removeEventListener("keydown",b.onKeyDown,!1);Draggable.unset($.id("threadOptsHeader"));$.id("threadOptsClose").removeEventListener("click",b.closeThreadOptionsFrame,!1);document.body.removeChild(b.threadOptsCnt);b.threadOptsCnt=null};b.onThreadOptsDone=function(a){b.threadOptsCnt&&"https://sys.4chan.org"===a.origin&&"done-threadopt"===a.data&&b.closeThreadOptionsFrame()};var s={ids:{},exec:function(a){var d,b,e;UA.isOpera&&"string"==typeof(e=document.getSelection())||(e=window.getSelection().toString());e?window.open("https://team.4chan.org/multi?field=com&value="+e):(d=a.getAttribute("data-id"),this.ids[d]||(this.ids[d]=!0,xhr=new XMLHttpRequest,xhr.open("POST","https://sys.4chan.org/"+Main.board+"/admin?res="+d),xhr.withCredentials=!0,xhr.onload=function(){if(200==this.status)/>([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)<\/td>/.test(this.responseText)?(b=this.responseText.match(/">([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)<\/td>/)[1],s.prompt(b,d)):alert("Error: Could not find IP. Perhaps this post has been deleted?");else this.onerror()},xhr.onerror=function(){alert("Error: Error while fetching IP (Status: "+this.status+").")},xhr.send(null)))},prompt:function(a,b){var c,e,g;c=$.id("pi"+b);e=$.cls("postMenuBtn",c)[0];g=document.createElement("a");g.href="https://team.4chan.org/multi?field=ip&value="+a;g.setAttribute("target","_blank");g.className="post-ip";g.textContent=a;c.insertBefore(g,e)}},h={cacheTTL:6E4,autoRefreshDelay:12E4,autoRefreshTimeout:null,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)},init:function(){var a,b;h.initVisibilityAPI();a=document.createElement("div");a.className="extPanel reply";a.id="adminToolbox";a.setAttribute("data-trackpos","AT-position");Config["AT-position"]?a.style.cssText=Config["AT-position"]:(a.style.right="10px",a.style.top="380px");a.style.position=Config.fixedAdminToolbox?"fixed":"";b='<div class="drag" id="atHeader">Moderator Tools<img alt="Refresh" title="Refresh" src="'+Main.icons.refresh+'" id="atRefresh" data-cmd="at-refresh" class="pointer right"></div><h4><a href="https://reports.4chan.org/" target="_blank">Reports</a>: <span title="Total" id="at-total">?</span> (<span title="Spam" id="at-spam">?</span> / <span title="Illegal" id="at-illegal">?</span>)</h4><h4><a href="https://reports.4chan.org/?action=ban_requests" target="_blank">Ban Requests</a>: <span id="at-banreqs">?</span> (<span title="Illegal" id="at-illegal-br">?</span>)</h4><h4><a href="https://team.4chan.org/appeals" target="_blank">Appeals</a>: <span id="at-appeals">?</span> (<span title="4chan Pass Users" id="at-prio-appeals">?</span>)</h4>';Main.tid&&(b+='<hr><h4><a href="javascript:void(0);" data-cmd="poster-id">Same Poster ID</a></h4>');a.innerHTML=b;document.body.appendChild(a);h.refreshReportCount();Draggable.set($.id("atHeader"))},onVisibilityChange:function(){document[h.hidden]?(clearInterval(h.autoRefreshTimeout),h.autoRefreshTimeout=null):(h.refreshReportCount(),h.autoRefreshTimeout=setInterval(h.refreshReportCount,h.autoRefreshDelay))},refreshReportCount:function(a){var b;if(!0!==a&&(b=localStorage.getItem("4chan-cache-rc"))&&(b=JSON.parse(b),b.ts>Date.now()-h.cacheTTL)){$.id("at-total").textContent=b.data[0];$.id("at-spam").textContent=b.data[1];$.id("at-illegal").textContent=b.data[2];$.id("at-banreqs").textContent=b.data[3];$.id("at-appeals").textContent=b.data[4];$.id("at-illegal-br").textContent=b.data[5]||0;$.id("at-prio-appeals").textContent=b.data[6]||0;return}a=new XMLHttpRequest;a.open("GET","https://reports.4chan.org/?action=count_reports",!0);a.withCredentials=!0;a.onload=function(){var a;if(200==this.status){try{a=JSON.parse(this.responseText)}catch(b){console.log(b);return}"success"!==a.status?console.log(a.message):(a=a.data,$.id("at-total").textContent=a.total,$.id("at-spam").textContent=a.spam,$.id("at-illegal").textContent=a.illegal,$.id("at-banreqs").textContent=a.banreqs,$.id("at-illegal-br").textContent=a.illegal_banreqs,$.id("at-appeals").textContent=a.appeals,$.id("at-prio-appeals").textContent=a.prio_appeals,a={ts:Date.now(),data:[a.total,a.spam,a.illegal,a.banreqs,a.appeals,a.illegal_banreqs,a.prio_appeals]},a=JSON.stringify(a),localStorage.setItem("4chan-cache-rc",a))}else this.onerror()};a.onerror=function(){console.log("Error while refreshing the report count (Status: "+this.status+").")};a.onloadend=function(){$.id("atRefresh").src=Main.icons.refresh};$.id("atRefresh").src=Main.icons.rotate;a.send(null)}};b.onClick=function(a){var d,c;if((d=a.target)!=document&&(c=d.getAttribute("data-cmd")))switch(c){case"at-refresh":h.refreshReportCount(!0);break;case"delete-post":case"delete-image":b.deletePost(d,"delete-image"===c);break;case"open-delete-prompt":b.openDeletePrompt(d);break;case"delete-cat-thread":case"delete-cat-image":b.deleteCatThread(d,"delete-image"===c);break;case"close-delete-prompt":b.closeDeletePrompt();break;case"thread-options":Config.inlinePopups?b.openThreadOptionsFrame(d):b.openThreadOptions(d);break;case"multi":a.preventDefault();s.exec(d);break;case"poster-id":b.loadSamePosters();break;case"ban":Config.inlinePopups?b.openBanFrame(d):b.openBanWindow(d)}};b.onCatClick=function(a){var d,c;if((d=a.target)!=document&&(c=d.getAttribute("data-cmd")))switch(c){case"delete-cat-thread":case"delete-cat-file":b.deleteCatThread(d,"delete-cat-file"===c);break;case"ban":b.openBanWindow(d)}};b.onScroll=function(){for(var a;b.nextChunk.offsetTop<document.documentElement.clientHeight+window.scrollY;){a=b.nextChunkIndex+b.chunkSize;if(a>=b.postCount)return b.parseRange(b.nextChunkIndex,b.postCount),window.removeEventListener("scroll",b.onScroll,!1),!1;b.parseRange(b.nextChunkIndex,a)}return!0};b.parseRange=function(a,d){var c,e,g;g=document.getElementById("t"+Main.tid).getElementsByClassName("postInfo");for(c=a;c<d&&(e=g[c]);++c)b.parseMobilePost(e);b.nextChunkIndex=c;b.nextChunk=g[c]};b.onParsingDone=function(a){var d,c;a?(c=a.detail.threadId,d=a.detail.offset,a=a.detail.limit,c=document.getElementById("t"+c).getElementsByClassName("postInfo"),b.sameIDActive&&b.loadSamePosters(c[d].id.slice(2))):(d=0,c=document.getElementsByClassName("postInfo"),a=c.length);for(;d<a;++d)b.parseMobilePost(c[d])};b.onPostMenuReady=function(a){var b,c,e;c=a.detail.postId;e=a.detail.node;b=document.createElement("li");b.className="dd-admin";b.setAttribute("data-cmd","open-delete-prompt");b.setAttribute("data-id",c);b.textContent="Delete";e.appendChild(b);b=document.createElement("li");b.className="dd-admin";b.setAttribute("data-cmd","ban");b.setAttribute("data-id",c);b.textContent="Ban";e.appendChild(b);b=document.createElement("li");b.className="dd-admin";b.innerHTML='<a href="#" data-cmd="multi" data-id="'+
- c+'">MultiSearch</a>';e.appendChild(b);a.detail.isOP&&(b=document.createElement("li"),b.className="dd-admin",b.setAttribute("data-cmd","thread-options"),b.setAttribute("data-id",c),b.textContent="Thread options",e.appendChild(b))};b.parseMobilePost=function(a){var b,c;c=a.id.slice(2);b=document.createElement("div");b.className="mobile mobileExtControls";b.innerHTML='<span data-cmd="open-delete-prompt" data-id="'+c+'">Delete</span><span data-cmd="ban" data-id="'+c+'">Ban</span>';a.parentNode.appendChild(b)};b.displayJCount=function(a,b,c,e){$.addClass(a,"j-newposts");$.addClass(b,"j-newposts");a.setAttribute("data-no",c);b.setAttribute("data-no",c);a.textContent=b.textContent="j +"+e;c=e+" new post"+(1<e?"s":"");Main.addTooltip(a,c,"j-tooltip");Main.addTooltip(b,c,"j-tooltip-bot")};b.refreshJCount=function(){var a,d,c,e;d=$.id("j-link");c=$.id("j-link-bot");if(d&&c){d=d.firstElementChild;c=c.firstElementChild;if(a=localStorage.getItem("4chan-j-count"))a=JSON.parse(a);!a||1E4<=Date.now()-a.time?(e=new XMLHttpRequest,e.open("GET","https://sys.4chan.org/j/imgboard?mode=latest&"+Date.now()),e.withCredentials=!0,e.onloadend=function(){var e,f;200==this.status||304==this.status?(e=JSON.parse(this.responseText),a&&"j"!=Main.board?e.no>a.no&&(f=e.no-a.no,b.displayJCount(d,c,e.no,f),f={time:Date.now(),no:a.no,delta:f}):f={time:Date.now(),no:e.no},f&&localStorage.setItem("4chan-j-count",JSON.stringify(f))):console.log("Error: Could not load /j/ post count (Status: "+this.status+").")},e.send(null)):a.delta&&b.displayJCount(d,c,a.no,a.delta)}};b.clearJCount=function(){var a,b,c;b=$.id("j-tooltip");c=$.id("j-tooltip-bot");b&&(a=this.getAttribute("data-no"),a={time:Date.now(),no:a},localStorage.setItem("4chan-j-count",JSON.stringify(a)),b.parentNode.removeChild(b),c.parentNode.removeChild(c),setTimeout(function(){var a=$.cls("j-newposts");a[0]&&(a[0].textContent="j",$.removeClass(a[0],"j-newposts"),a[0].textContent="j",$.removeClass(a[0],"j-newposts"))},10))};b.hasFlag=function(a){return-1!=this.flags.indexOf(a)};b.initNavLinks=function(){var a,d,c,e,g;e=$.id("navtopright");g=$.id("navbotright");a=document.createElement("span");a.id="j-link";a.innerHTML='[<a href="https://sys.4chan.org/j/" title="Janitor & Moderator Discussion">j</a>]';a.firstElementChild.addEventListener("mouseup",b.clearJCount,!1);e.parentNode.insertBefore(a,e);a=a.cloneNode(!0);a.id="j-link-bot";a.firstElementChild.addEventListener("mouseup",b.clearJCount,!1);g.parentNode.insertBefore(a,g);b.refreshJCount();d=e.lastElementChild.previousSibling;c=document.createDocumentFragment();c.appendChild(document.createTextNode("] ["));a=document.createElement("a");a.textContent="Team";a.href="https://team.4chan.org/";a.setAttribute("target","_blank");c.appendChild(a);c.appendChild(document.createTextNode("] ["));a=c.cloneNode(!0);e.replaceChild(c,d);d=g.lastElementChild.previousSibling;g.replaceChild(a,d)};b.initPostForm=function(){var a,d,c,e;if(a=$.id("postForm")){d=document.forms.post.name;if("hidden"==d.type&&b.hasFlag("forcedanonname")){c=document.createElement("tr");c.setAttribute("data-type","Name");c.innerHTML='<td>Name</td><td><input name="name" type="text"></td>';if(e=Main.getCookie("4chan_name"))c.lastChild.firstChild.value=e;e=d.parentNode.parentNode.parentNode;e.insertBefore(c,e.firstElementChild);d.parentNode.removeChild(d)}b.hasFlag("html")&&(d=document.createElement("tr"),d.innerHTML='<tr><td style="height: 20px;">Extra</td><td>[<label><input type="checkbox" name="html" value="1">HTML</label>]</td></tr>',a=a.firstElementChild,a.insertBefore(d,a.lastElementChild))}};b.onThreadMouseOver=function(a){a=a.target;$.hasClass(a,"thumb")&&(b.hasCatalogControls&&b.hideCatalogControls(),b.showCatalogControls(a))};b.showCatalogControls=function(a){var d,c;c=a.getAttribute("data-id");d=document.createElement("div");d.id="cat-ctrl";d.className=b.stylesheet;d.innerHTML='<span class="threadIcon deleteIcon" data-cmd="delete-cat-thread" data-id="'+c+'"></span><span class="threadIcon fileIcon" data-cmd="delete-cat-file" data-id="'+c+'"></span><span class="threadIcon banIcon" data-cmd="ban" data-id="'+
- c+'"></span>';(c=$.cls("threadIcons",a.parentNode.parentNode)[0])?c.insertBefore(d,c.firstElementChild):(c=document.createElement("div"),c.className="threadIcons",c.appendChild(d),a.parentNode.parentNode.insertBefore(c,a.parentNode.nextElementSibling));b.hasCatalogControls=!0};b.hideCatalogControls=function(){var a=$.id("cat-ctrl");a&&a.parentNode.removeChild(a);b.hasCatalogControls=!1};b.initCatalog=function(){Main={board:location.pathname.split(/\//)[1]};(b.stylesheet=b.getCookie(window.style_group))?b.stylesheet=b.stylesheet.toLowerCase().replace(/ /g,"_"):b.stylesheet="nws_style"==style_group?"yotsuba_new":"yotsuba_b_new";b.addCss();document.addEventListener("click",b.onCatClick,!1);document.addEventListener("DOMContentLoaded",b.runCatalog,!1)};b.runCatalog=function(){var a;document.removeEventListener("DOMContentLoaded",b.runCatalog,!1);a=$.id("threads");$.on(a,"mouseover",b.onThreadMouseOver)};b.init=function(){var a;SettingsMenu.options.Moderator={changeUpdateDelay:["Reduce auto-update delay","Reduce the thread updater delay",!0],fixedAdminToolbox:["Pin Moderator Tools to the page","Moderator Tools will scroll with you"],inlinePopups:["Inline admin panels","Open admin panels in browser window, instead of a popup"],forceHTTPS:["Always use HTTPS","Redirect to the HTTPS version automatically",!0],disableMngExt:["Disable moderator extension","Completely disable the moderator extension (overrides any checked boxes)",!0]};if(!Config.disableMngExt){if(a=Main.getCookie("4chan_aflags"))b.flags=a.split(",");if(Config.forceHTTPS&&"https:"!=location.protocol)if("#nohttps"==location.hash)Config.forceHTTPS=!1,Config.save();else{location.href=location.href.replace("http","https");return}document.addEventListener("4chanPostMenuReady",b.onPostMenuReady,!1);b.hasButtons=Config.reportButton?" extMngControls":"";b.addCss();QR.noCooldown=QR.noCaptcha=!0;QR.comLength=window.comlen=1E4;document.addEventListener("click",b.onClick,!1);document.addEventListener("DOMContentLoaded",b.run,!1)}};b.run=function(){var a,d;document.removeEventListener("DOMContentLoaded",b.run,!1);b.initNavLinks();b.initPostForm();Main.hasMobileLayout||h.init();Config.threadUpdater&&Main.tid&&Config.changeUpdateDelay&&(ThreadUpdater.delayIdHidden=3,ThreadUpdater.delayRange=[5,10,15,20,30,60,90]);if(Main.tid){if(Main.hasMobileLayout)if(a=document.getElementById("t"+Main.tid).getElementsByClassName("postInfo"),b.postCount=a.length,b.postCount>b.chunkSize)b.nextChunk=a[0],b.onScroll()&&window.addEventListener("scroll",b.onScroll,!1);else b.onParsingDone();d=$.cls("navLinksBot")[0];a=document.createElement("span");a.id="threadOptsButtom";a.innerHTML='[<a href="javascript:;" data-id="'+Main.tid+'" data-cmd="thread-options">Thread Options</a>]';d.appendChild(a)}else if(Main.hasMobileLayout)b.onParsingDone();Main.hasMobileLayout&&document.addEventListener("4chanParsingDone",b.onParsingDone,!1);if(d=$.id("boardSelectMobile"))a=document.createElement("option"),a.value="j",a.textContent="/j/ - Janitors & Moderators",d.insertBefore(a,d.firstElementChild)};b.getCookie=function(a){var b,c,e;e=a+"=";c=document.cookie.split(";");for(a=0;b=c[a];++a){for(;" "==b.charAt(0);)b=b.substring(1,b.length);if(0==b.indexOf(e))return decodeURIComponent(b.substring(e.length,b.length))}return null};b.addCss=function(){var a;a=document.createElement("style");a.setAttribute("type","text/css");a.textContent='#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;}#captchaFormPart { display: none;}#at-prio-appeals,#at-spam { color: blue;}#at-illegal-br,#at-illegal { color: red;}.j-newposts { font-weight: bold !important;}#j-link,#j-link-bot { margin-right: 2px; display: inline-block;}.extMngControls { margin-left: 0;}#adminToolbox hr { margin: 2px 0;}#threadOptsClose,#banReqClose { float: right;}#threadOpts iframe,#banReq iframe { overflow: hidden;}#threadOpts,#banReq { display: block; position: fixed; padding: 2px; font-size: 10pt;}#banReq { height: 421px;}#threadOpts { height: 141px;}#threadOptsHeader,#banReqHeader { text-align: center; margin-bottom: 1px; padding: 0; height: 18px; line-height: 18px;}#threadOptsButtom { float: right; margin-right: 4px;}.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;}#cat-ctrl {\tdisplay: inline-block;\tmargin-right: 2px;\tmargin-top: -1px;}#cat-ctrl .threadIcon { cursor: pointer;}.disabled { opacity: 0.5;}.burichan_new .deleteIcon,.yotsuba_b_new .deleteIcon { background-image: url("//s.4cdn.org/image/buttons/burichan/cross.png");}.burichan_new .banIcon,.yotsuba_b_new .banIcon { background-image: url("//s.4cdn.org/image/buttons/burichan/ban.png");}.burichan_new .fileIcon,.yotsuba_b_new .fileIcon { background-image: url("//s.4cdn.org/image/buttons/burichan/f.png");}.futaba_new .deleteIcon,.yotsuba_new .deleteIcon { background-image: url("//s.4cdn.org/image/buttons/futaba/cross.png");}.futaba_new .banIcon,.yotsuba_new .banIcon { background-image: url("//s.4cdn.org/image/buttons/futaba/ban.png");}.futaba_new .fileIcon,.yotsuba_new .fileIcon { background-image: url("//s.4cdn.org/image/buttons/futaba/f.png");}.photon .deleteIcon { background-image: url("//s.4cdn.org/image/buttons/photon/cross.png");}.photon .banIcon { background-image: url("//s.4cdn.org/image/buttons/photon/ban.png");}.photon .fileIcon { background-image: url("//s.4cdn.org/image/buttons/photon/f.png");}.tomorrow .deleteIcon { background-image: url("//s.4cdn.org/image/buttons/tomorrow/cross.png");}.tomorrow .banIcon { background-image: url("//s.4cdn.org/image/buttons/tomorrow/ban.png");}.tomorrow .fileIcon { background-image: url("//s.4cdn.org/image/buttons/tomorrow/f.png");}.dd-admin { text-indent: 5px;}.dd-admin:before { color: #FF0000; content: "\u2022"; left: -3px; position: absolute;}';document.head.appendChild(a)};/\/catalog$/.test(location.pathname)?b.initCatalog():b.init()})();
Advertisement
Add Comment
Please, Sign In to add comment