In the background script we have:
chrome.webRequest.onBeforeRequest.addListener(function (details) {
if (details.method === 'HEAD') {
if (details.url.endsWith('?start')) {
ringSound.play();
} else if (details.url.endsWith('?stop')) {
ringSound.pause();
ringSound.currentTime = 0;