I am using youtube music in my webbrowser on Android for blocking ads this way. I have a userscript installed in bromite for this job. As a side effect, the music stops playing after each song, even without blocking the ads. I tried a script for it which worked in bromite but not working in a different fork of chromium which I chose above bromite after it seems like its discontinued now.
But I just dont know why it does not get triggered anymore, maybe you can help out. The code I used so far working in bromite:
let lastUrl = location.href; new MutationObserver(() => { const url = location.href; if (url !== lastUrl) { lastUrl = url; onUrlChange(); } }).observe(document, {subtree: true, childList: true}); function onUrlChange() { setTimeout(function() { document.getElementById("play-pause-button").click(); }, 1000); } I already tried the code above and expect that when the url changes (moving to the next song) the playbutton gets triggered so the music keeps playing.
1Related questions 0 Chromium extension/userscript to shrink the Android Developer header 1 Userscript for hovercopy 1 jQuery.noConflict(); for userscript Related questions 0 Chromium extension/userscript to shrink the Android Developer header 1 Userscript for hovercopy 1 jQuery.noConflict(); for userscript 6 Chromium not playing mp3? 1 stop playing next video "onended" (jquery, userscript) 1 Shaders for YouTube videos using Three.js in a userscript 4 Building chromium project for Android 1 Youtube QR Code Generation UserScript not functioning 59 Embedded Chromium or Webkit in Android app Load 6 more related questions Show fewer related questions
Reset to default