Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. chrome.runtime.onInstalled.addListener(() => {
  2. console.log('onInstalled...');
  3. // create alarm after extension is installed / upgraded
  4. chrome.alarms.create('refresh', { periodInMinutes: 3 });
  5. });
  6.  
  7. chrome.alarms.onAlarm.addListener((alarm) => {
  8. console.log(alarm.name); // refresh
  9. helloWorld();
  10. });
  11.  
  12. function helloWorld() {
  13. console.log("Hello, world!");
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement