Created
March 20, 2024 08:07
-
-
Save snipem/cab5280f823647ccbcd63a4ec7c911cd to your computer and use it in GitHub Desktop.
Userscript KHInsider Autoplay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name KHInsider Autoplay | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Autoplays Soundtracks from KHInsider | |
// @author You | |
// @match https://downloads.khinsider.com/game-soundtracks/album/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=khinsider.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
window.addEventListener('load', function() { | |
console.log("Attempting Autoplay"); | |
document.getElementsByTagName("audio")[0].play(); | |
}, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You might have to enable audio autoplay for certain websites in your browser settings
This error was produced in my case:
Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission