twister-html/js/calm.js

36 lines
1.2 KiB
JavaScript
Raw Normal View History

$(function(){
$('#showqr').on('click', function(){
2014-03-25 03:01:30 +00:00
if($('#qrcode img')[0]) return;
var skey = document.getElementById('skey').innerText;
new QRCode(document.getElementById("qrcode"), skey);
});
$('.tox-ctc').on('click', function(){
window.prompt('Press Ctrl/Cmd+C to copy then Enter to close', $(this).attr('data'))
})
$('.bitmessage-ctc').on('click', function(){
window.prompt('Press Ctrl/Cmd+C to copy then Enter to close', $(this).attr('data'))
})
})
function dhtIndicatorBg(){
var bgcolor = '';
2014-03-25 03:01:30 +00:00
if(twisterDhtNodes <= 20){bgcolor = '#770900'
}else if(twisterDhtNodes <= 60){bgcolor = '#773400'
}else if(twisterDhtNodes <= 90){bgcolor = '#774c00'
}else if(twisterDhtNodes <= 120){bgcolor = '#776400'
}else if(twisterDhtNodes <= 150){bgcolor = '#707500'
}else if(twisterDhtNodes <= 180){bgcolor = '#3f6900'
}else if(twisterDhtNodes <= 210){bgcolor = '#005f15'
}else if(twisterDhtNodes >= 250){bgcolor = '#009922'
}
$('.userMenu-dhtindicator').animate({'background-color': bgcolor });
};
setTimeout(dhtIndicatorBg, 300);
setTimeout(function() {setInterval(dhtIndicatorBg, 2000)}, 400);
function homeIntInit () {
setTimeout(mensAutocomplete, 800);
2014-03-17 03:03:12 +00:00
}