open2chExtender / open2chExtender

// ==UserScript==
// @license MIT
// @author  open2chExtender
// @name    open2chExtender
// @version               2017/12/07
// @description Version 2017/12/07
// @include http://*open2ch.net/*
// @include http://*.2ch.sc/*
// @include htt*://*5ch.net/*
// @include htt*://*bbspink.com/*
// @include http://iand2ch.net/*
// @include http://ameroad.net/*
// @include http://costime.jp/*
// @include htt*://openuserjs.org/users/*
// @include http://refind2ch.org/search?q=*
// @include htt*://find.5ch.net/search?q=*
// @include http://find.2ch.sc/index.php?*
// @include http://find.2ch.sc/?STR=*
// @include http://find.2ch.sc/?TYPE=TITLE&*
// @exclude htt*://open2ch.net/dev/*
// @exclude http://open2ch.net/
// @exclude http://open2ch.net
// @exclude htt*://premium.5ch.net/*
// @exclude htt*://www.5ch.net/
// @exclude htt*://www.5ch.net
// @exclude http://www.2ch.sc/
// @exclude http://www.2ch.sc
// @exclude http://2ch.sc/
// @exclude http://2ch.sc
// @exclude http://find.open2ch.net/*
// @exclude http://find.open2ch.net
// @exclude http://refind2ch.org/
// @exclude http://refind2ch.org
// @exclude htt*://dig.5ch.net/*
// @exclude htt*://dig.5ch.net
// @exclude htt*://find.5ch.net/
// @exclude htt*://find.5ch.net
// @exclude http://find.2ch.sc/index.php
// @exclude http://find.2ch.sc/
// @exclude http://find.2ch.sc
// @run-at document-end
// @grant   none
// ==/UserScript==

(function(){if((0)&&(document.referrer.split('#')[0]!=location.href.split('#')[0])&&(location.href.match(/(\/subback\.html\?)/))){location.reload();};if(d=document.getElementsByTagName('head')){d[0].innerHTML+='<style>a:link,a:hover,a:active,a:focus,a:visited{text-decoration:none !important;}</style>'}if(location.href.match(/^(https:\/\/find\.5ch\.net\/search\?|https:\/\/[\w\-]+\.5ch\.net\/[\w\-]+\/#list)/)){location.replace(location.href.replace(/^(https:)/,'http:'));eval('*');}setTimeout(";window.stop();",300000);if(location.href.match(/^(http:\/\/[\w\-]+\.)(2ch\.net|bbspink\.com)(\/test\/\#list)/)){window.history.go(-2);eval('*');}else{if(document.title.match(/(2ch\.netの設定メニュー|2ch\.netの説明\/使い方|スマホのブラウザで快適2ちゃんねる|@2ちゃんねるのスレッド一覧|のスレッド\s*\|)/)){eval('*');};RES=50;if((location.href.match(/^(http:\/\/[\w\-]+\.)(open2ch|2ch)(\.)(sc|net)(\/[\w\-]+\/#list)$/))&&(!location.href.match(/^(http:\/\/[\w\-]+\.)(open2ch|2ch)(\.)(sc|net)(\/test\/#list)$/))){setTimeout(";window.open(\'#list\',\'_self\');",0);}
if((location.href.match(/(\/subback\.html)/))){if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){d[i].innerHTML=d[i].innerHTML.replace(/(\[無断転載禁止\]|\[転載禁止\]|©bbspink\.com|©[25]ch\.net|\(c\)[25]ch\.net)/img,'').replace(/([\/\、\・\・])([\/\、\・\・]*)/img,'$1').replace(/([■]+)/img,'■').replace(/([━]+)/img,'━').replace(/([\ー]+)/img,'ー').replace(/(wwww+)/img,'www').replace(/(。+)/img,'。').replace(/([ \s]+)/img,' ');if(d[i].innerHTML.match(/(_____|戦場実況、|室櫻子|www+|netの人気スレ|[ちうま]んこ|[チウマ]ンコ|とすて|トステ|てすと|テスト|あああ|けけけ|ケケケ|ェケェケェ|神の怒り|刑事第|浪人[をは]|[\(\(]ヨ[\)\)]|繧薙|キチガイ|[\死\氏]ね|クズクズクズ|======|======|テテテテテテ|ウウウウウウ|髷髷|馬鹿|下 ?遼 ?太|川和久|ㅤ)/)){d[i].innerHTML=d[i].innerHTML.split(':')[0]+':';};}}}
if((location.href.match(/^(https?:\/\/find\.5ch\.net\/search\?q\=)/))){if(document.body.innerHTML.match(/(一致するスレッドは見つかりませんでした)/)){location.replace('http://find.2ch.sc/?STR='+location.href.replace('http://find.5ch.net/search?q=','')+'&TYPE=TITLE&BBS=ALL&ENCODING=UTF-8&SCEND=D&SORT=MODIFIED');eval('*')}}
if((location.href.match(/^(https?:\/\/[\w\-]+\.5ch\.net\/test\/read\.cgi\/[\w\-]+\/[\d]+\/?)/))){if((0<=document.title.indexOf('datが存在しません'))||((0)&&(undefined==document.getElementsByTagName('textarea')[0]))||(document.body.innerHTML.match(/(XcLength\">[5-9][1-9][0-9]KB<)/))){location.replace(location.href.replace('.5ch.net/','.2ch.sc/'));eval('*')}}
if((location.href.match(/^(http:\/\/[\w\-]+\.)(2ch\.net|bbspink\.com)(\/test\/bbs\.cgi\/?)/))){if(0<=document.title.indexOf('書きこみました。')){lh=document.referrer.replace('test/read.cgi/','');lh=lh.split(lhx=('/'+lh.split('/')[3]))[0]+lhx;setTimeout("location.replace('"+(lh+'#list')+"');eval('*');",500);eval('*');}}if((location.href.match(/^(https?:\/\/www2\.5ch\.net\/live\.html\#list)/))){if(0<=document.title.indexOf('もうずっと人大杉')){setTimeout(";history.back();location.reload();eval('*');",0);}}
if((location.href.match(/^(https?:\/\/)(find\.2ch\.sc\/index.php\?|find\.2ch\.sc\/\?STR=|find\.2ch\.sc\/\?TYPE=TITLE&|find\.5ch\.net\/search\?q=)/))){if((location.href.match(/(refind2ch)/i))&&(document.title.match(/(Forbidden)/i))){location.replace('http://find.2ch.sc/'+location.search.replace('q=','STR=')+'&TYPE=TITLE&BBS=ALL&ENCODING=UTF-8&SCEND=D&SORT=MODIFIED');eval('*');}
if(d=document.getElementsByTagName('a')){d[0].innerHTML+='<style>a:link,a:hover,a:active,a:focus,a:visited{text-decoration:none !important;}body,table,span,div{background-color:#bbcced !important;}#wrap_topbanner,#adlantis,table[width="300px"]{display:none !important;}a:link{color:#0000ff !important;}a:visited{color:#800080 !important;}a:active{color:#800080 !important;}a:hover{color:#ff8000 !important;}a:hover,a:focus{color:deeppink !important;}*{font-family:MeiryoKe_PGothic,"Helvetica Neue",Arial,Helvetica,"Lucida Grande","Hiragino Kaku Gothic ProN","ヒラギノ角ゴ ProN W3",Meiryo,メイリオ,"Meiryo UI",sans-serif !important;font-size:9pt !important}.ads_pc_rectangle_body,iframe{width:0px !important;height:0px !important;display:none !important;}</style>';netsw=0;
for(i=0;d.length>i;i++){if(((d[i].href.match(/^(https?:\/\/[\w\-]+\.)(5ch\.net|\w+\.com)(\/test\/read\.cgi\/[\w\-]+\/\d+)/i))||(0<d[i].href.indexOf('/0-')))&&(0>d[i].href.indexOf('/p2/'))){d[i].target='_blank';d[i].href=d[i].href.replace(/^(https?:\/\/[\w\-]+\.5ch\.net\/test\/read\.cgi\/[\w\-]+\/\d+)/i,'$1/0-').replace(/^(http:\/\/[\w\-]+\.bbspink\.com\/test\/read\.cgi\/[\w\-]+\/\d+)/i,'$1/0-').replace('/0-','/l'+RES);
d[i].innerHTML=d[i].innerHTML.replace(/(<[^>]*>)/img,'').replace(/(\[+無?断?転載禁止\]+)/img,'').replace(/(\s*[\©\C\�]・?[25]ch.net\s*)+/img,'');if((d[i].href.match(/^(http:\/\/\w+\.\w+\.com\/\w+\/)/))){d[i].innerHTML='<font color=#F00>➋sc</font> <font color=#F0F>➎pink</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}
else if((d[i].href.match(/^(http:\/\/\w+\.[25]ch\.)(net|sc)(\/\w+\/)/))){sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].href='http://menu.5ch.net/bbsmenu.html?thread='+d[i].href;d[i].innerHTML='<a target=_blank href='+sc.replace('.5ch.net/','.2ch.sc/')+'><font color=#F00>➋sc</font> </a><font color=#F50>➎net</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');netsw=1;}else{d[i].innerHTML='<font color=#F00>➋sc</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');netsw=0;};}
else if((d[i].href.match(/^(http:\/\/\w+\.\w+\.com\/\w+\/)$/))&&(0>d[i].href.indexOf('://find.2ch.sc/'))){d[i].href+='#list';d[i].target='_blank';if((location.href.match(/(&BBS=all)/i))||(location.href.match(/(\.5ch\.net\/search\?q=)/i))||(netsw)){sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].href='http://menu.5ch.net/bbsmenu.html?board='+d[i].href;d[i].innerHTML='<a target=_blank href='+sc.replace(/([\w\-]*\.?2ch\.sc)/,'open2ch.net')+'><font color=#E80>➋open</font> <a target=_blank href='+sc+'><font color=#F00>➋sc</font> </a><font color=#F0F>➎pink</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}else{sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].innerHTML='<a target=_blank href='+sc.replace(/([\w\-]*\.?2ch\.sc)/,'open2ch.net')+'><font color=#E80>➋open</font> </a><font color=#F00>➋sc</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}netsw=0;}
else if((d[i].href.match(/^(http:\/\/\w+\.5ch\.net\/\w+\/)$/))&&(0>d[i].href.indexOf('://find.2ch.sc/'))){d[i].href+='#list';d[i].target='_blank';if((location.href.match(/(&BBS=all)/i))||(location.href.match(/(\.5ch\.net\/search\?q=)/i))||(netsw)){sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].href='http://menu.5ch.net/bbsmenu.html?board='+d[i].href;d[i].innerHTML='<a target=_blank href='+sc.replace(/([\w\-]*\.?2ch\.sc)/,'open2ch.net')+'><font color=#E80>➋open</font> <a target=_blank href='+sc+'><font color=#F00>➋sc</font> </a><font color=#F50>➎net</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}else{sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].innerHTML='<a target=_blank href='+sc.replace(/([\w\-]*\.?2ch\.sc)/,'open2ch.net')+'><font color=#E80>➋open</font> </a><font color=#F00>➋sc</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}netsw=0;}
else if((d[i].href.match(/^(http:\/\/\w+\.2ch\.sc\/\w+\/)$/))&&(d[i].href.match(/\/(kawaii|kawaii)\//))){d[i].href+='#list';d[i].target='_blank';if((location.href.match(/(&BBS=net)/i))||(location.href.match(/(\.5ch\.net\/search\?q=)/i))||(netsw)){sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].href='http://menu.5ch.net/bbsmenu.html?board='+d[i].href;d[i].innerHTML='<a target=_blank href='+sc.replace('.5ch.net/','.2ch.sc/')+'><font color=#F00>➋sc</font> </a><font color=#F50>➎net</font> '+d[i].innerHTML.replace(/(板板)/img,'板');}else{sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].innerHTML='<font color=#F00>➋sc</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}netsw=0;}
else if((d[i].href.match(/^(http:\/\/\w+\.2ch\.sc\/\w+\/)$/))&&(0>d[i].href.indexOf('://find.2ch.sc/'))){d[i].href+='#list';d[i].target='_blank';if((location.href.match(/(&BBS=net)/i))||(location.href.match(/(\.5ch\.net\/search\?q=)/i))||(netsw)){sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].href='http://menu.5ch.net/bbsmenu.html?board='+d[i].href;d[i].innerHTML='<a target=_blank href='+sc.replace(/([\w\-]*\.?2ch\.sc)/,'open2ch.net')+'><font color=#E80>➋open</font> <a target=_blank href='+sc+'><font color=#F00>➋sc</font> </a><font color=#F50>➎net</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}else{sc=d[i].href.replace('.5ch.net/','.2ch.sc/');d[i].innerHTML='<a target=_blank href='+sc.replace(/([\w\-]*\.?2ch\.sc)/,'open2ch.net')+'><font color=#E80>➋open</font> </a><font color=#F00>➋sc</font> '+d[i].innerHTML.replace(/(板板)/img,'板').replace(/(&amp;?)/img,'&');}netsw=0;};}}}else{;if((location.href.match(/^(https?:\/\/)(\w+\.5ch\.net|\w+\.bbspink\.com)(\/\w+\/subback\.html)/))){setTimeout(";tx=document.getElementsByTagName('body');tx[0].innerHTML+='<style>body{display:inline !important;}*{background:#CFC;}.addstyle .addstyle_trad-fixed{width:auto  !important;margin:5px !important;}.addstyle .addstyle_thread{margin: 5px !important;display:inline !important;padding:0px  !important;position:relative !important;border-bottom:0px  !important;text-decoration:underline  !important;}.addstyle .addstyle_header{display:none !important;color:#000  !important;height:0px  !important;background:none  !important;text-align:center  !important;line-height:0px  !important;}.addstyle_thread_resnumber{display:none !important;}.addstyle_menubar{height:0px  !important;background:none  !important;line-height:20px  !important;padding-right:10px  !important;}.addstyle .addstyle_trad-center {display: block;text-align: left;background:#CFC;border-radius:5px;}.addstyle .addstyle_container{padding: 20px 0;text-align:center; background:#CFC;}</style>';",200);}
if((location.href.match(/^(https?:\/\/open2ch\.net\/menu\/pc_menu\.html\?title=)/))){ref='/'+document.referrer.split('/')[3]+'/';if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0<d[i].href.indexOf(ref)){window.open(d[i].href+'#list','_self');eval('*');break;}}window.open('http://open.open2ch.net/'+(ref)+'#list','_self');eval('*');}}
if((location.href.match(/^(https?:\/\/menu\.2ch\.sc\/bbsmenu\.html\?title=)/))){ref='/'+document.referrer.split('/')[3]+'/';if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0<d[i].href.indexOf(ref)){window.open(d[i].href+'#list','_self');eval('*');break;}}window.open('http://open.2ch.sc/'+(ref)+'#list','_self');eval('*');}}
if((location.href.match(/^(https?:\/\/menu\.5ch\.net\/bbsmenu\.html\?title=)/))){ref='/'+document.referrer.split('/')[3]+'/';if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0<d[i].href.indexOf(ref)){window.open(d[i].href+'#list','_self');eval('*');break;}}window.open('http://open.5ch.net/'+(ref)+'#list','_self');eval('*');}}
if((location.href.match(/^(https?:\/\/menu\.5ch\.net\/bbsmenu\.html\?board=)/))&&(0<location.href.indexOf('#list'))){board=location.href.split('?board=')[1];ref=('/'+board.split('/')[3]+'/');if(d=document.getElementsByTagName('a')){d[0].innerHTML+='<style>*{display:none !important;}</style>';for(i=0;d.length>i;i++){if(0<d[i].href.indexOf(ref)){window.open(board.replace('/'+board.split('/')[2]+'/','/'+d[i].href.split('/')[2]+'/'),'_self');eval('*');break;}}}}
if((location.href.match(/^(https?:\/\/menu\.5ch\.net\/bbsmenu\.html\?thread=)/))&&(0<location.href.indexOf('/read.cgi/'))){thread=location.href.split('?thread=')[1];ref=('/'+thread.split('/')[5]+'/');if(d=document.getElementsByTagName('a')){d[0].innerHTML+='<style>*{display:none !important;}</style>';for(i=0;d.length>i;i++){if(0<d[i].href.indexOf(ref)){window.open(thread.replace('/'+thread.split('/')[2]+'/','/'+d[i].href.split('/')[2]+'/'),'_self');eval('*');break;}}}}
if((location.href.match(/^(https?:\/\/openuserjs\.org\/)/))){if((location.href.match(/^(https?:\/\/openuserjs\.org\/users\/[\w\-]+\/*)$/))){location.replace(location.href.replace(/(\/*)$/,'')+'/scripts');eval('*')}}else{if((location.href.match(/^(https?:\/\/nasu.bbspink\.com\/debut\/?)/))){document.title='AV新人@bbspink';}else if((location.href.match(/^(https?:\/\/\w+\.5ch\.net\/galileo\/?)/))){document.title='宇宙@5ch.net';}
if((location.href.match(/^(https?:\/\/iand2ch\.net\/)/))){if(0<=location.href.indexOf('url=')){location.replace(location.href.split('url=')[1].replace(/(%25)/img,'%'));eval('*')}else if(d=document.getElementsByTagName('a')){d[0].innerHTML+='<style>div#imageview,div.imageview{heihgt:640px !important;}img#imageview_image{width:320px !important;}img#imageview_image:hover{width:640px !important;} ul#thread > li,ul#subback > li{background-color:#fee !important;}ul#thread > li.res_ad > iframe,ul#thread >li.res_ad > a,ul#subback > li.ad > a{display:none !important;}</style>';for(i=0;d.length>i;i++){d[i].href=d[i].href.replace(/(ps\.jpg)$/img,'pl.jpg')}}}else{;
if((location.href.match(/^(https?:\/\/)(5ch\.net|\w*\.5ch\.net)(\/?|\/index\.html?)$/))){location.replace(location.href.replace('//5ch.net/','//2ch.sc/'));eval('*');}if(document.title.match(/(ちゃんねる専用ブラウザをご利用の皆さま)/)){s=location.href.split('/');l='http://'+s[2]+'/'+s[5]+'/';if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(d[i].innerHTML.match(/(スマホ版)/)){d[i].href=l.replace(/(\/\/\w+\.5ch\.net\/)/,'//iand5ch.net/subback/');}if(d[i].innerHTML.match(/(掲示板に戻る|全部|1\-|最新)/)){d[i].href=l;}}}l=location.href.replace(/(\/\/\w*\.?bbspink\.com)/,'//iand5ch.net').replace(/(\/\/\w*\.?5ch\.net)/,'//iand5ch.net');if(!location.href.match(/(v=pc)$/)){location.replace(l);eval('*');}}
if((location.href.match(/^(https?:\/\/\w+\.2ch\.sc\/test\/read\.cgi\/\w+\/\d+\/?)/))&&(1)){if(d=document.getElementsByTagName('center')){for(i=d.length-1;0<=i;i--){if(d[i].innerHTML.match(/(新着レスの表示)/)){if(1){d[i].innerHTML='<input style="font-size:14px;height:25px !important;" type=button value=★iand2chで新着レスの表示★ onfocus=this.blur(); onclick=window.open(\''+location.href.replace(/(\/\/\w+\.2ch\.sc\/)/,'//iand5ch.net/')+'\',\'_blank\');return(false);>'}else{d[i].innerHTML='<a style=display:block; target=_blank onclick=this.target=\'_blank\'; href='+location.href.replace(/(\/\/\w+\.2ch\.sc\/)/,'//iand5ch.net/')+'>★iand2chで新着レスの表示★</a>'}}}}}
if((location.href.match(/:\/\/(ameroad\.net\/)$/))){window.open('http://ameroad.net/?m=m_new','_top');eval('*')}else if((location.href.match(/:\/\/ameroad\.net\/?$/))){addElementBody('<style>div.menu1,div.menu2,div[style^="position: absolute; top: 0px; left:"]{display:none !important;}</style>');}else if((location.href.match(/:\/\/ameroad\.net\//))){addElementBody('<style>div.menu1,div.menu2{display:none !important;}</style>');
}else if((location.href.match(/:\/\/www\.crowy\.net\//))){setTimeout("doc='<style>div.ithumb-container > ul > li > a > img{display:none !important}</style>';function addElementBody(doc){if(ele=document.createElement('div')){with(ele){id='BodyChild';innerHTML=doc;}document.body.appendChild(ele);}}addElementBody(doc);",555);
}else if((location.href.match(/:\/\/costime\.jp\/vote\/clock\/\d+/))){at=document.getElementsByTagName('p');if(0>at[1].innerHTML.indexOf('<')){if(0>at[1].innerHTML.indexOf('<img')){at[1].innerHTML='<a target=_blank href="http://twitter.com/intent/tweet?text='+encodeURIComponent('CosTime コスプレ時計 #コスタイム #コスプレ\n'+location.href+'\nhttp://costime.jp/img/clock/1/'+(document.body.innerHTML.split(x='"/img/clock/1/')[1].split('.')[0])+'.jpg ').split('\'').join('%27')+'"><img align=middle width=23 height=23 border=0 src=http://twitter-badges.s3.amazonaws.com/t_logo-a.png></a> '+at[1].innerHTML;}}else{location.replace('http://costime.jp/main?language=jp')}
}else if((location.href.match(/:\/\/open2ch\.net\/[\w\-]+\/(index\.html?|)/))&&(!location.href.match(/\/(subback\.html|pc_menu\.html)/))){window.open(location.href.replace(/(:\/\/open2ch\.net\/)([\w\-]+)(\/)(index\.html?|)/,'://uni.open2ch.net/$2/').split('?')[0].split('#')[0]+'#list','_self');eval('*');
}else if((location.href.match(/:\/\/\w*\.?2ch\.sc\//))&&(!location.href.match(/:\/\/uni\.2ch\.sc\//))&&((location.href.match(/(\?5chnet|\?5chnet#list)$/))||(document.referrer.match(/(\?5chnet|\?5chnet#list)$/)))){;window.open(location.href.replace('2ch.sc/','5ch.net/').split('?')[0].split('#')[0]+'#list','_self');eval('*');
}else{Open2chWith='net';Open2chSearch='net';ShowPlate=1024;ShowPlateTiming=100;SideFramePX=140;CenterFramePX=120;if(navigator.userAgent.match(/(Opera|Safari|Chrome)/)){CenterFramePX-=5}localStorage['open2chWith']=Open2chWith;
if(0){localStorage['open2chReferrer']=document.referrer;if(0<location.href.indexOf('?title=')){location.replace('http://open2ch.net/open2ch/subback.html'+location.search);}else{location.replace(location.href.replace('open2ch.net',(localStorage['open2chReferrer']+'//').split('//')[1].split('.')[0]+'.2ch.sc'));};;}
else{if(('sc'==Open2chSearch)&&(0==location.href.indexOf('http://refind2ch.org/search?q='))){if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){d[i].href=d[i].href.replace(/(\/\/\w+\.bbspink\.com)/,'//iand5ch.net').replace(/(\/\/\w+\.5ch\.)(net)/,'$1sc');}}}else{
if(location.href.match(/(^http:\/\/)(\w*.?open2ch\.net\/\w+|[\w\-]+\.bbspink\.com\/[\w\-]+)(\/subback\.html)(\?|$)/)){if(document.referrer){localStorage['open2chReferrer']=document.referrer;}s=' @@@ ';
if((0<(l=location.href).indexOf('?title='))&&(r=localStorage['open2chReferrer'])&&(r.match(/([25]ch\.|[\w\-]+\.bbspink\.)/))&&(!r.match(/(:\/\/)(open2ch\.net|bbspink\.com)(\/)/))){
u=(localStorage['open2chReferrer']+'//').split('//')[1].split('.')[0];if((1)&&(d=document.getElementsByTagName('a'))){for(i=0;d.length>i;i++){d[i].innerHTML='';}}if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){d[i].href=d[i].href.replace('://open2ch.net/','://'+u+'.open2ch.net/');}}
t=decodeURIComponent(l.substr(l.indexOf('=')+1));if((!localStorage['open2chExtender'])||(0>localStorage['open2chExtender'].indexOf(s))){localStorage['open2chExtender']='';}
localStorage['open2chExtender']=r+' '+t+s+localStorage['open2chExtender'];h=localStorage['open2chExtender'].split(s);w='<style>small#trad > b{display:none !important;}</style><font color=red><b>◆現在の板◆ ⇒</b></font> ';x='';y='';z='';gx='';gy='';gz='';for(i=0;Math.min(ShowPlate,h.length-1)>i;i++){ai=h[i].split(' ')[0];
bi=h[i].substr(ai.length+1).replace(/(ニュース速報\(VIP\))/img,'ニュー速VIP').replace(/(掲示板[ \ ]*)$/img,'').split('@')[0].split('@')[0].split('(')[0].split('(')[0].replace(/(。+)/img,'。');if(bi.match(/([\+\ ]\-[\+\ ]おーぷん2ちゃんねる)/img)){bi=bi.replace(/([\+\ ]\-[\+\ ]おーぷん2ちゃんねる)/img,'')}if(bi.match(/^(AV+?)$/)){bi='AV+'}if(bi.match(/(名無し)/img)){bi=''}if(bi.match(/(仮想通貨)/)){bi='仮想通貨'}if(bi.match(/(保険業界α)/)){bi='保険業界'}if(bi.match(/(ピュアオーディオ)/)){bi='ピュアAU'}if(bi.match(/(DJ、クラブ|DJクラブ)/)){bi='DJ・クラブ'}if(bi.match(/(チアリーディング|チアー)/)){bi='チア'}if(bi.match(/(自動車)/)){bi='車'}if(bi.match(/(DB)/)){bi='データベース'}if(bi.match(/(離島・沖縄)/)){bi='トロピカル'}if(bi.match(/(ーハーフ)/)){bi='ニューハーフ'}if(0<=bi.indexOf("実況せんか")){bi='実況ch'}if(0<=bi.indexOf("Debut")){if(0<ai.indexOf('bbspink.com')){bi='AV新人'}}
ai=ai.split('?')[0].split('#')[0].replace(/(\/)(index\.html?)$/img,'/');if(0<ai.indexOf('open2ch.')){bx='open2ch';dx='➋open';cx='#E80'}else if(0<ai.indexOf('2ch.sc/')){bx='2chsc';dx='➋sc';cx='#F00'}else if(0<ai.indexOf('bbspink.com/')){bx='bbspink';dx='➎pink';cx='#F0F'}else{bx='5chnet';dx='➎net';cx='#F50'}if(0<ai.indexOf('.bbspink.com/')){bx='{'+bx+'板}'}else{bx='('+bx+'板)'};bi=bi.split('@')[0].split('@')[0].split(' ')[0]+' '+bx;ci=cx;if(0==i){a0=ai;b0=bi;c0=ci;}if((0==i)||(b0!=bi)){if(!bi.match(/(アルミ缶)/)){
if((' (open2ch板)'==bi)||(' (2chsc板)'==bi)||(' (5chnet板)'==bi)||(' {bbspink板}'==bi)||('AV {bbspink板}'==bi)||(0<ai.indexOf('/subback.'))){continue;}else{if(a0.split('/')[3]==ai.split('/')[3]){gx+=ai.replace(/^(https:)/,'http:')+' '+bi+s;x+=(' <wbr><a target=_top href="'+ai+'#list"><font color='+ci+'>'+dx+'</font><wbr> '+bi.split(' ')[0]+' <wbr>(板)</a> ');}else if((('#F0F'==c0)&&('#F0F'==ci))||(('#F0F'!=c0)&&('#F0F'!=ci))){gy+=ai+' '+bi+s;y+=(' <wbr><a target=_top href="'+ai+'#list"><font color='+ci+'>'+dx+'</font> '+bi.split(' ')[0]+' <wbr>(板)</a> ');}else{gz+=ai+' '+bi+s;z+=(' <wbr><a target=_top href="'+ai+'#list"><font color='+ci+'>'+dx+'</font> '+bi.split(' ')[0]+' <wbr>(板)</a> ');}}}};}localStorage['open2chExtender']=gx+gy+gz;
if(d=document.getElementById('trad')){if(0>d.innerHTML.indexOf('//open2ch.net/favicon.ico')){d.innerHTML=w+x+y+z+'<a href='+location.href.split('subback.')[0].replace('//open2ch.net/','//uni.open2ch.net/')+'></a>'+d.innerHTML;}}}
}if((0<=location.href.indexOf('http://refind2ch.org/search?q='))){if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0==i){d[0].innerHTML+='<img width=0 height=0 boder=0 style=display:none; src=http://www.atspace.tv/><style>#adspotdiv,.ads_banner,.ads_big_banner{display:none !important;}</style>'}if(0>d[i].href.indexOf('javascript')){d[i].target='_blank';d[i].href=d[i].href.replace(/(:\/\/[\w\-]+\.open2ch\.net)/,'://uni.open2ch.net');}}}
}else if(location.href.match(/(:\/\/open2ch\.net\/[\w\-]+\/subback\.html)/)){if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0>d[i].href.indexOf('javascript')){d[i].target='_top';d[i].href=d[i].href.replace(/(:\/\/[\w\-]+\.)(open2ch\.net\/test\/read\.cgi)/,'://uni.$2');}}}
}else if(0<=location.href.indexOf('http://open2ch.net/menu/pc_menu.html')){if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0>d[i].href.indexOf('javascript')){d[i].target='_top';d[i].href=d[i].href.replace(/(:\/\/[\w\-]+\.)/,'://uni.');}}}
}else if(0<=location.href.indexOf('http://menu.5ch.net/bbsmenu.html')){if(d=document.getElementsByTagName('form')){for(i=0;d.length>i;i++){if(0<=d[i].innerHTML.indexOf('<input ')){d[i].innerHTML='';break;}}}
if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0>d[i].href.indexOf('javascript')){d[i].target='_top';}};for(i=0;d.length>i;i++){if(0<=d[i].innerHTML.indexOf('<img ')){d[i].innerHTML='';break;}}}
}else if(0<=location.href.indexOf('http://menu.2ch.sc/bbsmenu.html')){if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if(0>d[i].href.indexOf('javascript')){d[i].target='_top';if(10>i){d[i].innerHTML=d[i].innerHTML.replace('2ch','2chsc');}}}}
}else{if(d=document.getElementsByTagName('a')){for(i=0;d.length>i;i++){if((!d[i].href.match(/(#)/))&&(d[i].innerHTML.match(/(板に戻る)/img))){d[i].href+='#list'}}}
if(d=document.getElementsByTagName('a')){cnt=0;for(i=0;d.length>i;i++){d[i].href=d[i].href.replace(/(%2C)/img,',').replace('http://2ch.io/','http://').replace('http://jump.5ch.net/?','http://').replace('http://www.pinktower.com/?','');;;d[i].href=d[i].href.replace('http://https//','https://').replace('http://http//','http://').replace(/(%81@)$/img,'');if(d[i].innerHTML.match(/( )$/)){d[i].innerHTML=d[i].innerHTML.replace(/( )$/img,'');};;;
if((d[i].href.match(/(javascript)/img))||((d[i].href.match(/([25]ch\.|bbspink\.)/img))&&(!d[i].href.match(/(find5ch\.)/img))&&(!d[i].href.match(/(jump\.5ch\.)/img)))){d[i].target='_top'}else{d[i].target='_blank'};if((d[i].href.match(/^(https?:\/\/[\w\-]*\.?)(open2ch\.com|5ch\.net|2ch\.sc|bbspink\.com)(\/[\w\-]+\/?)(index\.html?|)(\#\d+)$/))){d[i].href=d[i-1].href;}
if(((d[i].href.match(/(:\/\/\w*\.?)([25]ch|open2ch)(\.)(sc|net)(\/\w+\/subback\.html$)/))||(d[i].href.match(/(:\/\/\w+\.)(bbspink)(\.)(com)(\/\w+\/subback\.html$)/)))){;
if((!location.href.match(/^(http:\/\/menu\.5ch\.net\/bbsmenu)/))&&(location.href.match(/(\.bbspink\.com\/)/))){d[i].innerHTML='<style>input,textarea{background:#FFF !important;border:1px solid gray !important;}input[type=button],input[type=reset],input[type=submit],input[type="button"],input[type="reset"],input[type="submit"]{background:#DDD !important;border:1px solid gray !important;}#sidemenu .sidemenu_banner{z-index:0 !important;width:188px !important;</style>'+d[i].innerHTML;}
if(d[i].innerHTML.match(/(スレッド全?一覧は?こ?ち?ら?)/)){td='td';chk='スレッド一覧はこちら';if(location.href.match(/(\.open2ch\.net\/)/)){td='td';chk='スレッド一覧';}else if(location.href.match(/(\.bbspink\.com\/)/)){td='div';}else if(d[i].innerHTML.match(/(スレッド全一覧はこちら)/)){td='div';chk='スレッド全一覧はこちら';}if(td=document.getElementsByTagName(td)){;;;;;for(j=td.length-1;0<=j;j--){if(0<=td[j].innerHTML.indexOf('>'+chk)){if(cnt){break;}else{cnt++;}
di0=d[i].href.replace('.5ch.net/','.open2ch.net/').replace('.2ch.sc/','.open2ch.net/').replace(/(:\/\/)([\w\-]+\.)(open2ch\.net\/)/,'$1$3');if((1)||(0<di0.indexOf('.bbspink.com/'))){di0='http://nasu.bbspink.com/debut/subback.html';di0='http://open.open2ch.net/open2ch/subback.html';}
di1=d[i].href.replace('.open2ch.net/','.2ch.'+Open2chWith+'/').replace('//open.5ch.net/','//open2ch.net/').replace('//open.2ch.sc/','//open2ch.net/').replace('//open2ch.net/open2ch/','//uni.open2ch.net/open2ch/').replace(/(:\/\/uni\.2ch\.sc\/)(open2ch|oekaki)(\/subback\.html)/,'://uni.open2ch.net/$2$3');;di1=d[i].href;
di2='http://open2ch.net/menu/pc_menu.html';di3='http://menu.5ch.net/bbsmenu.html';if(0<location.href.indexOf('2ch.sc/')){di3='http://menu.2ch.sc/bbsmenu.html';}if(0<location.href.indexOf('open2ch.net/')){di3='http://menu.2ch.'+Open2chWith+'/bbsmenu.html';}
if(1){di0=di0.replace(/^(https?:\/\/)/img,'//');di1=di1.replace(/^(https?:\/\/)/img,'//');di2=di2.replace(/^(https?:\/\/)/img,'//');di3=di3.replace(/^(https?:\/\/)/img,'//');};;;;;if(location.href.match(/(open2ch\.net)/)){di3=di2;}
menuopen2ch='open2ch.net/menu/pc_menu';menu2chsc='menu.2ch.sc/bbsmenu';menu5chnet='menu.5ch.net/bbsmenu';if(location.href.match(/^(http:\/\/[\w\-]+\.bbspink\.com\/)/)){menuopen2ch='menu.5ch.net/bbsmenu';menu2chsc='menu.5ch.net/bbsmenu';menu5chnet='menu.5ch.net/bbsmenu';td[j].innerHTML+='<a name="list" href=""><span></span></a><center> <br> <br> <br></center>'}
td[j].innerHTML+='<style>a:link,a:hover,a:active,a:focus,a:visited{text-decoration:none !important;}#myNavbar,.navbar-header,.thread_list_scroll,.banner_area_468{display:none !important;}</style><table style="width:100% !important;height:'+(4*CenterFramePX)+'px !important;"><tr><td style="vertical-align:top;text-align:center;"><a name="list" href=""><span></span></a><a name="list1" href=""><span></span></a> <br><style>div[fixed]{disply:none !important;}</style>'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=別表示 onfocus=this.blur(); onclick="document.open2chform2d.submit();window.open(\'#list\',\'_self\');return(false);">'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=再読込 onfocus=this.blur(); onclick="location.reload();eval(\'*\');return(false);">'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=表示位置 onfocus=this.blur(); onclick="window.open(\'#list\',\'_self\');return(false);">'+
'<form style=display:none; name=open2chform2 target=open2chframe2 action="'+(di1)+'" method=get accept-charset=utf-8></form>'+'<form style=display:none; name=open2chform2d target=_blank action="'+(di1)+'" method=get accept-charset=utf-8></form><br>'+
'<iframe id=open2chframe2 name=open2chframe2 style="width:100% !important;height:'+(2.5*CenterFramePX)+'px !important;" frameborder=0 src="'+(di1)+'"></iframe><br>'+'<a name="list2" href=""><span></span></a> <br>'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=別表示 onfocus=this.blur(); onclick="document.open2chform1d.submit();window.open(\'#list\',\'_self\');return(false);">'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=再読込 onfocus=this.blur(); onclick="location.reload();eval(\'*\');return(false);">'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=新規作成 onfocus=this.blur(); onclick="window.scroll(0,99999999);return(false);">'+
'<form style=display:none; name=open2chform1 target=open2chframe1 action="'+(di0)+'" method=get accept-charset=utf-8><input type=hidden name=title value="'+(document.title.split('©')[0].split('@')[0].split('?')[0].split(' ')[0].split('@2ch')[0])+'"></form>'+
'<form style=display:none; name=open2chform1d target=_blank action="'+(di0)+'" method=get accept-charset=utf-8><input type=hidden name=title value="'+(document.title.split('©')[0].split('@')[0].split('?')[0].split(' ')[0].split('@2ch')[0])+'"></form><br>'+
'<iframe id=open2chframe1 name=open2chframe1 style="width:100% !important;height:'+(1*CenterFramePX)+'px !important;" frameborder=0 src="'+(di0+'?title='+document.title.split('©')[0].split('@')[0].split('?')[0].split(' ')[0].split('@2ch')[0])+'"></iframe><br>'+'<a name="list3" href=""><span></span></a> <br>'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=open2ch onfocus=this.blur(); onclick="window.open(\''+('http://'+menuopen2ch+'.html?title='+document.title.split('(')[0].split('(')[0].split('@')[0].split('@')[0].split('@2ch')[0])+'\',\'_self\');return(false);">'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=2chsc onfocus=this.blur(); onclick="window.open(\''+('http://'+menu2chsc+'.html?title='+document.title.split('(')[0].split('(')[0].split('@')[0].split('@')[0].split('@2ch')[0])+'\',\'_self\');return(false);">'+
'<input style="font-size:14px;width:33.333% !important;height:25px !important;" type=button value=5chnet onfocus=this.blur(); onclick="window.open(\''+('http://'+menu5chnet+'.html?title='+document.title.split('(')[0].split('(')[0].split('@')[0].split('@')[0].split('@2ch')[0])+'\',\'_self\');return(false);">'+'</td></tr></table>';;;
if((!navigator.userAgent.match(/(Edge)/))){setTimeout(";if((!navigator.userAgent.match(/(Edge)/))){document.open2chform1.submit();};",ShowPlateTiming);};;;;;
td[j].innerHTML+='<center>'+'<a style="color:orange !important;" onfocus=this.blur(); target=_blank href=https://openuserjs.org/scripts/open2chExtender/open2chExtender><font color=orange style="position:relative;bottom:3px;font-size:12px;">+open2chExtender</font></a> '+'<a style="color:orange !important;" onfocus=this.blur(); target=_blank href=https://openuserjs.org/scripts/open2chExtender/open2chAdBlock><font color=orange style="position:relative;bottom:3px;font-size:12px;">+open2chAdBlock</font></a> '+'<a style="color:orange !important;" onfocus=this.blur(); target=_blank href=https://openuserjs.org/scripts/open2chExtender/open2chYouVideo><font color=orange style="position:relative;bottom:3px;font-size:12px;">+open2chYouVideo</font></a> '+
'</center><style>#paging{display:none !important;}</style><table style=white-space:nowrap; cellspacing=0 cellpadding=2 border=0 width=100% height=40><tr>'+'<td width=5% align=center> <a onFocus=this.blur() style=font-size:8pt; target=_blank href=http://translate.google.com/><font color=blue>翻訳 Trans</font></a><style>input{height:25px !important;}</style></td>'+
'<td align=right><a target="_blank" href="" onclick=window.open(\'http://www.google.com/search?hl=ja&num=100&sitesearch=open2ch.net&q=YouTube\',\'_blank\'); style=font-weight:700;font-size:10pt;color:blue;>open2ch</a></td><td><form style=display:inline; name=form method=get target=_blank action=http://www.google.com/search accept-charset=utf-8><input name=hl value=ja type=hidden><input name=num value=100 type=hidden><input type=hidden name=sitesearch value="open2ch.net"><input name=q value="" type=text style=width:65px;><input type=reset value=" C "><input type=submit value=Search></form></td>'+
'<td align=right><a target="_blank" href="" onclick=window.open(\'http://www.google.com/search?hl=ja&num=100&sitesearch=2ch.sc&q=YouTube\',\'_blank\'); style=font-weight:700;font-size:10pt;color:blue;>2chsc</a></td><td><form style=display:inline; name=form method=get target=_blank action=http://www.google.com/search accept-charset=utf-8><input name=hl value=ja type=hidden><input name=num value=100 type=hidden><input type=hidden name=sitesearch value="2ch.sc"><input name=q value="" type=text style=width:65px;><input type=reset value=" C "><input type=submit value=Search></form></td>'+
'<td align=right><a target="_blank" href="" onclick=window.open(\'http://www.google.com/search?hl=ja&num=100&sitesearch=5ch.net&q=YouTube\',\'_blank\'); style=font-weight:700;font-size:10pt;color:blue;>5chnet</a></td><td><form style=display:inline; name=form method=get target=_blank action=http://www.google.com/search accept-charset=utf-8><input name=hl value=ja type=hidden><input name=num value=100 type=hidden><input type=hidden name=sitesearch value="5ch.net"><input name=q value="" type=text style=width:65px;><input type=reset value=" C "><input type=submit value=Search></form></td>'+
'<td width=6% align=center><font color=blue style=font-size:8pt;><a target=_blank href=http://imgur.com/><font color=blue>Imgur 画像</font></a> </td>'+'</tr><tr>'+'<td width=5% align=center> <a onfocus=this.blur(); style=font-size:8pt; target=_blank href=http://goo.gl/><font color=blue>短縮 goo.gl</font></a></td>'+
'<td align=right><a target="_blank" href="" onclick=window.open(\'http://www.google.com/search?num=100&ie=utf-8&q=YouTube\',\'_blank\'); style=font-weight:700;font-size:10pt;color:blue;>Google</a></td><td><form style=display:inline; name=form method=get target=_blank action=http://www.google.com/search accept-charset=utf-8><input name=q type=text style=width:65px;><input name=num value=100 type=hidden><input name=ie value=utf-8 type=hidden><input type=reset value=" C "><input type=submit value=Search></form></td>'+
'<td align=right><a target="_blank" href="" onclick=window.open(\'http://find.2ch.sc/?STR=YouTube&TYPE=TITLE&BBS=ALL&ENCODING=UTF-8&SCEND=D&SORT=MODIFIED\',\'_blank\'); style=font-weight:700;font-size:10pt;color:blue;>find2sc</a></td><td><form style=display:inline; name=form method=get target=_blank action=http://find.2ch.sc/ accept-charset=utf-8><input name=STR type=text style=width:65px; value=""><input name=TYPE type=hidden value=TITLE><input name=BBS type=hidden value=ALL><input name=ENCODING type=hidden value=UTF-8><input name=SCEND type=hidden value=D><input name=SORT type=hidden value=MODIFIED><input type=reset value=" C "><input type=submit value=Search></form></td>'+
'<td align=right><a target="_blank" href="" onclick=window.open(\'http://find.5ch.net/search?q=YouTube\',\'_blank\'); style=font-weight:700;font-size:10pt;color:blue;>find5net</a></td><td><form style=display:inline; name=form method=get target=_blank action=http://find.5ch.net/search accept-charset=utf-8><input name=q type=text style=width:65px; value=""><input type=reset value=" C "><input type=submit value=Search></form></td>'+
'<td width=6% align=center><a onFocus=this.blur() style=font-size:8pt; target=_blank onclick=window.scroll(0,99999999);return(false); href="javascript:;"><font color=blue>Write 投稿</font></a> </td></tr>'+
'<tr><td colspan=8 align=center nowrap><font color=orange style=position:relative;bottom:0px;font-size:12px;>'+(navigator.userAgent).replace(/(\)|\ )/img,'$1<wbr>')+' <wbr>Width/<span id=cWidth>'+document.body.clientWidth+'</span>px/'+screen.width+'px</font></td></tr></table>';
location.replace('#list');setInterval("document.getElementById('cWidth').innerHTML=''+document.body.clientWidth;",300);break;}}}}}}}}}}}}}};;;};})();