Greasy Fork is available in English.
Stops the automatic playing of recommended tracks on Soundcloud.
当前为
// ==UserScript==
// @name Stop Automatic Recommendations on Soundcloud
// @namespace soundcloud-no-autoplay
// @author Veeno
// @contributor Kai Kuehner
// @contributor Technowise
// @contributor Andreas J. Schwarz
// @description Stops the automatic playing of recommended tracks on Soundcloud.
// @include http://www.soundcloud.com/*
// @include https://www.soundcloud.com/*
// @include http://soundcloud.com/*
// @include https://soundcloud.com/*
// @grant none
// @version 1.2
// @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
// ==/UserScript==
//-------------------------------------------------------------------------------------------
var sc_cp = {};
sc_cp.checkInterval = setInterval(checkA, 500);
function checkA() {
var title = $("a.playbackSoundBadge__context").attr("title");
if(title == undefined || title.substring(0, 28) != "Playing from recommendations") {
clearInterval(sc_cp.checkInterval);
sc_cp.checkInterval = setInterval(checkB, 100);
}
}
function checkB() {
var title = $("a.playbackSoundBadge__context").attr("title");
if(title != undefined && title.substring(0, 28) == "Playing from recommendations") {
$("button.playControl[title='Pause current']").click();
clearInterval(sc_cp.checkInterval);
sc_cp.checkInterval = setInterval(checkA, 500);
}
}