Skip to content

Instantly share code, notes, and snippets.

@maanimis
Created October 22, 2024 13:00
Show Gist options
  • Save maanimis/fdfdbcbf31e3916b9908b6a5ff7332ad to your computer and use it in GitHub Desktop.
Save maanimis/fdfdbcbf31e3916b9908b6a5ff7332ad to your computer and use it in GitHub Desktop.
Violentmonkey adblocker script for soundcloud.com
// ==UserScript==
// @name soundcloud.com
// @namespace Violentmonkey Scripts
// @match https://soundcloud.com/*
// @grant none
// @version 1.0
// @author -
// @description 1/22/2024, 2:01:13 PM
// ==/UserScript==
setInterval(function(){
var source = document.getElementsByTagName('html')[0].innerHTML;
var found = source.search("Advertisement");
if(found != -1){
window.location.reload(true);
}
}, 1000);
function alertFunction() {
setTimeout(function(){
var btn = document.querySelector(".playControls__play");
btn.click();
}, 3000);
}
window.onload = alertFunction;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment