您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automaticly redirects to current playing song.
// ==UserScript== // @name SoundCloud - Auto redirect to current playing // @namespace armagan.rest // @version 1.1 // @description Automaticly redirects to current playing song. // @author Kıraç Armağan Önal // @match https://soundcloud.com/* // @grant none // ==/UserScript== (function() { 'use strict'; function getGetBadgesElement() {return document.querySelector(".playbackSoundBadge__actions")}; function getAutoRedirectCheckbox() {return document.querySelector(".auto-redirect-button")}; function isPlaying() {return Boolean(document.querySelector(".playControls__play.playing"))}; function getNowplayingElement() {return document.querySelector(".playbackSoundBadge__titleLink")}; function getNowplayingLink() {return (getNowplayingElement() || {}).href || ""}; let isAutoRedirectActive = false; let lastNowPlayingLink = getNowplayingLink(); setInterval(()=>{ // Eğer sayfa ayarlar sayfası falansa umursamasın diye. if (!getGetBadgesElement()) return; if (!getAutoRedirectCheckbox()) { let checkBoxElement = document.createElement("input"); checkBoxElement.type = "checkbox"; checkBoxElement.checked = isAutoRedirectActive; checkBoxElement.title = "Auto redirect to current playing page"; checkBoxElement.style.marginTop = "5px"; checkBoxElement.style.marginLeft = "6px"; checkBoxElement.classList.add("auto-redirect-button"); checkBoxElement.addEventListener("change",()=>{ isAutoRedirectActive = checkBoxElement.checked; }); getGetBadgesElement().appendChild(checkBoxElement); } if (isPlaying() && isAutoRedirectActive && lastNowPlayingLink != getNowplayingLink()) { getNowplayingElement().click(); lastNowPlayingLink = getNowplayingLink(); } },1000) })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址