diff --git a/chrome/background.js b/chrome/background.js index c95a76c..6523f54 100644 --- a/chrome/background.js +++ b/chrome/background.js @@ -5,27 +5,45 @@ chrome.runtime.onInstalled.addListener(function() { chrome.declarativeContent.onPageChanged.addRules([ { conditions: [ + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'beatsmusic.com', pathPrefix: "/album" }, + }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'beatsmusic.com', pathPrefix: "/track" }, + }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'deezer.com', pathPrefix: "/album" }, + }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'deezer.com', pathPrefix: "/track" }, + }), new chrome.declarativeContent.PageStateMatcher({ pageUrl: { hostEquals: 'play.google.com', pathPrefix: "/music" }, }), new chrome.declarativeContent.PageStateMatcher({ pageUrl: { hostEquals: 'itunes.apple.com', pathPrefix: "/music" }, }), - new chrome.declarativeContent.PageStateMatcher({ - pageUrl: { hostSuffix: 'spotify.com' }, - }), - new chrome.declarativeContent.PageStateMatcher({ - pageUrl: { hostSuffix: 'beatsmusic.com' }, - }), - new chrome.declarativeContent.PageStateMatcher({ - pageUrl: { hostSuffix: 'deezer.com' }, - }), new chrome.declarativeContent.PageStateMatcher({ pageUrl: { hostSuffix: 'rdio.com' }, }), new chrome.declarativeContent.PageStateMatcher({ pageUrl: { hostSuffix: 'rd.io' }, }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'spotify.com', pathPrefix: "/album" }, + }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'spotify.com', pathPrefix: "/track" }, + }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'music.xbox.com', pathPrefix: "/track" }, + }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'music.xbox.com', pathPrefix: "/album" }, + }), + new chrome.declarativeContent.PageStateMatcher({ + pageUrl: { hostSuffix: 'youtube.com' }, + }, []) ], actions: [ new chrome.declarativeContent.ShowPageAction() ]