Skip to content
Advertisement

How to use chrome.alarms for Google Chrome extension

manifest.json

JavaScript

I trying to create a function to make a popup “great” every minute like this:

JavaScript

Could someone please tell why is it not triggering that alert. I check the console, no error was displayed.

Advertisement

Answer

Here is the simplest working example I can think of, warning it is very annoying as when the alarm is on it alerts “Beep” every 12 seconds. It uses a popup browser action to switch the alarm on and off.

manifest.json

JavaScript

popup.html

JavaScript

popup.js

JavaScript

And the important bit in eventPage.js

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement