open2chExtender / iforexTradeExtender

// ==UserScript==
// @license MIT
// @author  iforexTradeExtender
// @name    iforexTradeExtender
// @version               2021/02/01
// @description Version 2021/02/01
// @include https://trader.iforex.com/webpl3/webtrader.html?*
// @exclude https://coin.z.com/jp/member/trade/chart/*
// @exclude https://coin.z.com/jp/member/exchange/chart/*
// @run-at document-end
// @grant   none
// ==/UserScript==

(function(){W=500;H=480*1.3;if(!navigator.userAgent.match(/(iPhone|iPod|iPad|Linux|Android)/)){W=650;}
FX=' width='+(W)+' height=202 frameborder=0 border=1 style=position:relative;left:-163px; scrolling=no allowtransparency=false ';
setInterval('window.scrollBy(0, -1);window.scrollBy(0, 1);',12000);setTimeout('location.reload();',3.5*60*1000);
TX='style=z-index:1;position:absolute!important;top:'+(H+860)+'px;left-margin:auto;right-margin:auto;width:1310px;><style>div::-webkit-scrollbar{display:none;}</style>';
TX+='<style>div#tradingButtons{position:relative!important;left:25px;top:92px;}</style><style>#SummaryView,div#QuotesTableScroll{height:'+(H)+'px!important;}</style>';
setTimeout("if(d=document.getElementsByTagName('div')){for(i=d.length-1;0<i;i--){if('logo'==d[i].className){d[i].innerHTML+='<span "+TX+"</span>';}}}",5000);
localStorage['SpreadRateSkip']=1500;SpreadRate=(function(param){return(param[0].replace(/(\n|\r)/g,''));})`
if(0<(T=parseInt(localStorage['SpreadRateSkip'])-50)){localStorage['SpreadRateSkip']=T}else{BID=0;ASK=0;if(('https://trader.iforex.com/webpl3/webtrader.html?view=2'==location.href)){
if(d=document.getElementsByTagName('tr')){N=d[1].innerHTML.split('<td').length-1;if(d=document.getElementsByTagName('td')){
for(i=0;d.length>i;i++){if((2<=i%N)&&(i%N<=4)){;}else{continue;}if((2==i%N)&&('rate bidWidth'!=d[i].className)){break;}
DT=d[i].innerHTML.replace(/<[^>]*>/img,'').replace(/([^\\d\\.]+)/img,(''));if(2==i%N){BID=parseFloat(DT);}if(3==i%N){ASK=parseFloat(DT);}
if((4==i%N)&&(0<BID*ASK)&&(10>d[i].innerHTML.length)){SP=(ASK-BID);SPR=100*SP/BID;d[i].innerHTML='<center><nobr>'+d[i].innerHTML.split('%')[0]+'%<font color=magenta>('+(SPR+'00000').substr(0,5)+'%)</font></nobr></center>';}}}}}}`;setInterval(SpreadRate,100);})();