Snippets

Karyl Gilbertson Green Spotify Icon UserScript

Created by Karyl Gilbertson last modified
// ==UserScript==
// @name         Green Spotify Favicon
// @namespace    https://paintedsky.ca/
// @version      1.0
// @description  Spotify Web Player favicon is black by default, doesn't work well for dark browser themes. This replaces it with a green version of the logo, pretty simple.
// @author       Karyl Gilbertson
// @match        https://open.spotify.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var linkTags = document.getElementsByTagName('link');
    for ( var i = 0; i < linkTags.length; i++ ) {
        var rel = linkTags[i].getAttribute('rel');
        if ( rel == 'icon' ) {
            // You can replace the address here with the URL of any image, as you please.
            linkTags[i].setAttribute('href','https://s0.wp.com/wp-content/themes/vip/spotify-usa/images/icons/spotify_icon.png');
        }
    }
})();

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.