Put simpleParallax and modify logo.php to merge
This commit is contained in:
@@ -12,7 +12,7 @@ blockchainListener = function(){
|
||||
function _logBlockHash(leblock, flag)
|
||||
{
|
||||
if (flag) return "logBlockHash";
|
||||
console.log('Last Block detected : '+leblock.hash);
|
||||
topistoConsole.log('Last Block detected : '+leblock.hash);
|
||||
};
|
||||
|
||||
function _isBlockNew(leblock)
|
||||
@@ -41,20 +41,20 @@ blockchainListener = function(){
|
||||
|
||||
function _addBlockHook(addBlockHook){
|
||||
var hookname = addBlockHook(null, true);
|
||||
var flag_add = true;
|
||||
var flag_add = false;
|
||||
_last_block_hooks.forEach(function(trigger) {
|
||||
if (trigger instanceof Function)
|
||||
{
|
||||
var local_hookname = trigger(null, true);
|
||||
flag_add = flag_add && (local_hookname == hookname);
|
||||
flag_add = flag_add || (local_hookname == hookname);
|
||||
}
|
||||
});
|
||||
if (flag_add) _last_block_hooks.push(addBlockHook);
|
||||
if (!flag_add) _last_block_hooks.push(addBlockHook);
|
||||
};
|
||||
|
||||
function _init(){
|
||||
_addBlockHook(_logBlockHash);
|
||||
setTimeout(_lastBlockTrigger, 30000);
|
||||
setInterval(_lastBlockTrigger, 30000);
|
||||
};
|
||||
|
||||
return {init: _init, addBlockHook: _addBlockHook};
|
||||
|
||||
Reference in New Issue
Block a user