2 <meta http-equiv=
"refresh" content=
"10" />
6 function setIcon(badge,title){
7 chrome.browserAction.setBadgeText({'text':badge});
8 chrome.browserAction.setTitle({'title':title});
11 function getKybcaMails(){
12 if(!localStorage[
"secs"]) localStorage[
"secs"] =
30;
13 var check_mail_timer = setTimeout(
"getKybcaMails()", localStorage[
"secs"] *
1000);
14 var pkReqUrl='https://kyberia.sk/ajax/check_new_mail.php';
15 var pkReq=new XMLHttpRequest();
16 pkReq.onload=function(){
17 var mail = pkReq.responseText.split(
";");
18 switch(mail[
0].replace(/^\s+|\s+$/g,
"")) { //trim() := replace(/^\s+|\s+$/g,
"")
20 setIcon(
"?!",
"Connection problem... Not loged in?");
21 localStorage[
"reconnect"] =
1;
24 localStorage[
"reconnect"] =
1;
26 setIcon(
"",
"No new mail on Kyberia.");
29 setIcon(mail[
0], mail[
0]+
" new mails! last from: "+mail[
1]);
32 pkReq.open('GET',pkReqUrl);
36 chrome.browserAction.onClicked.addListener(function(tab) {
37 chrome.tabs.create({url:'https://kyberia.sk/id/
24'});
40 setIcon(
"?",
"Waiting for first contact...");
46 <iframe id=
"lif" src=
"login.html"></iframe>