NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Enhancements for Ishkur's Guide to Electronic Music // @namespace http://tampermonkey.net/ // @version 0.1 // @description search on spotify (button top left) and skip track via media key in chrome. super dirty script, might break any time :) // @author You // @include *://music.ishkur.com* // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; var trying = true; var tryzoom = function () { if (trying) { if (document.body.contains(document.querySelector(".ol-rotate"))) { var rotatebutton = document.querySelector(".ol-rotate"); rotatebutton.classList.remove("ol-hidden"); rotatebutton.innerHTML = "Search on Spotify"; rotatebutton.onclick = function () { var tracktitle = document.querySelector("#showtrack"); var url = "https://open.spotify.com/search/" + encodeURIComponent(tracktitle.innerHTML); window.open(url, '_blank'); }; trying = false; } } else { clearInterval(intervalId); } }; var intervalId = setInterval(tryzoom, 200); var trying2 = true; var tryzoom2 = function () { if (trying2) { if (document.body.contains(document.querySelector(".mejs-nexttrack-button button"))) { var next = document.querySelector(".mejs-nexttrack-button button"); navigator.mediaSession.setActionHandler('nexttrack', function () { next.click(); }); trying2 = false; } } else { clearInterval(intervalId2); } }; var intervalId2 = setInterval(tryzoom2, 200); })();