Last active
July 25, 2023 01:28
-
-
Save kienankb/e20e7233e99969ceaa774b1bae1dcb50 to your computer and use it in GitHub Desktop.
fix-twitter-favicon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name fix-twitter-favicon | |
// @namespace kienankb-scripts | |
// @version 0.2 | |
// @description nobody wants to deal with an X on twitter | |
// @author kienankb | |
// @match *://*.twitter.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com | |
// @updateURL https://gist.githubusercontent.com/kienankb/e20e7233e99969ceaa774b1bae1dcb50/raw/fix-twitter-favicon.js | |
// @downloadURL https://gist.githubusercontent.com/kienankb/e20e7233e99969ceaa774b1bae1dcb50/raw/fix-twitter-favicon.js | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let linkElements = document.getElementsByTagName("link"); | |
for (var element of linkElements) { | |
if (element.getAttribute("rel") === "shortcut icon") { | |
element.setAttribute("href", "//abs.twimg.com/favicons/twitter.ico"); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment