My extension is designed to control music playback on the music.yandex.by web-site. When user click buton in popup I am passing message from background to content script. While the music is playing, everything works as it should. However, if you stop the music and switch to another tab, after about 5 minutes the content script stops receiving messages, while the background script continues to receive messages.
Here is manifest
{ "manifest_version": 2, "default_locale": "en", "name": "__MSG_extension_name__", "description": "__MSG_extension_description__", "version": "1.0", "content_scripts": [{ "js": [ "content.js" ], "matches": [ "*://music.yandex.by/*" ] }], "background": { "scripts": ["background.js"], "persistent": true }, "web_accessible_resources": [ "images/my-image.png" ], "action": { "default_icon": "toolbarItemIcon.pdf", "default_title": "Открыть Яндекс Музыку" }, "externally_connectable": { "matches": [ "*://music.yandex.by/*" ] }, "permissions": [ "nativeMessaging", "*://music.yandex.by/*" ] } I use ports to communicate between the background script and the content script.
I believe that after a certain period of time, the inactive page goes into standby mode and disables the content script. Is there any way to bypass this limitation?
I would be very grateful for any advice.