var activetab="", hostfull="", host="", header="", blstatus="", msg3="", msg4="", msg5="", msg6="", msg7="", msg8=""; //receiving (host,header,blsatus) from bg framework.extension.getItem('count', function(value) { host=value; }); /* framework.extension.getItem('countHEAD', function(value) { header=value; }); */ /* framework.extension.getItem('countBL', function(value) { blstatus=value; }); */ framework.extension.getItem('BIGcount', function(value) { hostfull=value[0]; msg7=value[1]; //dyn hid ifr msg8=value[2]; //dyn sc req msg3=value[3]; //tag encode msg4=value[4]; //meta msg5=value[5]; //ext domain msg6=value[6]; //trackers }); var y=[]; y.push(host); y.push(header); y.push(blstatus); y.push(hostfull); y.push(msg7); y.push(msg8); y.push(msg3); y.push(msg4); y.push(msg5); y.push(msg6); framework.extension.getItem('TAB', function(value) { activetab=value; //newtab (first time) if( activetab.match("chrome://newtab/") || activetab.match("chrome://extensions/") || activetab.match(hostfull)){ framework.extension.setItem(hostfull, JSON.stringify(y)); } //previously loaded and stored in the hostfull/activetab reference else{ framework.extension.getItem(activetab, function(value) { if(value){ var details=JSON.parse(value); host=details[0]; header=details[1]; blstatus=details[2]; hostfull=details[3]; msg7=details[4]; msg8=details[5]; msg3=details[6]; msg4=details[7]; msg5=details[8]; msg6=details[9]; } else{ blstatus="",host="",header="",msg3="",msg4="",msg5="",msg6="",msg7="",msg8=""; //document.getElementById("cdac_domain").innerHTML=$.parseHTML("Reload the page to view details"); $('#cdac_domain').html($.parseHTML("Reload the page to view details")); } }); } }); //updating panel if(host){ $('#cdac_domain').html($.parseHTML("
Analysis Report for "+host+"
")); } if(msg7){ $('#cdac_one').html(msg7); $('#cdac_menuone').html($.parseHTML("
Hidden iframe(s) Redirections
")); $('#topCountone').html($.parseHTML("
")); } else{ $('#cdac_one').html($.parseHTML("No Hidden iframes")); $('#cdac_menuone').html($.parseHTML("
Hidden iframe(s) Redirections
")); $('#topCountone').html($.parseHTML("
")); } if(msg8){ $('#cdac_two').html($.parseHTML(msg8)); $('#cdac_menutwo').html($.parseHTML("
UnAuthorized Redirections
")); $('#topCounttwo').html("
"); } else{ $('#cdac_two').html($.parseHTML("No UnAuthorized Redirections")); $('#cdac_menutwo').html($.parseHTML("
UnAuthorized Redirections
")); $('#topCounttwo').html($.parseHTML("
")); } if(msg3){ $('#cdac_three').html(msg3); $('#cdac_menuthree').html($.parseHTML("
Encoded JavaScript
")); $('#topCountthree').html($.parseHTML("
")); } else{ $('#cdac_three').html($.parseHTML("No Encoded JavaScript")); $('#cdac_menuthree').html($.parseHTML("
Encoded JavaScript
")); $('#topCountthree').html($.parseHTML("
")); } if(msg4){ $('#cdac_four').html($.parseHTML("
"+msg4+"
"+"

"+host+" links to the following External Domains:
"+msg5)); $('#cdac_menufour').html($.parseHTML("
External Domain Requests
")); $('#topCountfour').html($.parseHTML("
")); } else if(msg5){ $('#cdac_four').html($.parseHTML(host+" links to the following External Domains:
"+msg5)); $('#cdac_menufour').html($.parseHTML("
External Domain Requests
")); $('#topCountfour').html($.parseHTML("
")); } else{ $('#cdac_four').html($.parseHTML("No External Domain Requests")); $('#cdac_menufour').html($.parseHTML("
External Domain Requests
")); $('#topCountfour').html($.parseHTML("
")); } if(msg6){ $('#cdac_five').html($.parseHTML(msg6)); $('#cdac_menufive').html($.parseHTML("
Trackers
")); $('#topCountfive').html($.parseHTML("
")); }else{ $('#cdac_five').html($.parseHTML("No Trackers found")); $('#cdac_menufive').html($.parseHTML("
Trackers
")); $('#topCountfive').html($.parseHTML("
")); }