mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-04-23 01:32:51 +02:00
committed by
Kumar McMillan
parent
01181a350b
commit
395786e353
@@ -0,0 +1,10 @@
|
||||
setInterval(function() {
|
||||
var $game = document.querySelector('#game');
|
||||
if($game.innerText !== 'ping'){
|
||||
$game.innerText = 'ping';
|
||||
} else{
|
||||
chrome.runtime.sendMessage({action: 'ping'},function(response) {
|
||||
$game.innerText = response;
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
Reference in New Issue
Block a user