-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGitHub_WhiteFavIcon.user.js
24 lines (23 loc) · 1.91 KB
/
GitHub_WhiteFavIcon.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// ==UserScript==
// @name GitHub White FavIcon
// @namespace https://vash.omnimir.ru/
// @version 0.6
// @description Site favicon for Dark Theme Browser i.e. color vice versa
// @author kapsilon
// @license MIT
// @match https://github.com/*
// @grant none
// ==/UserScript==
(function () {
"use strict";
//Create link tag to new favicon
let newFavicon = document.createElement("link");
newFavicon.rel = "icon";
newFavicon.type = "image/svg+xml";
//Encoding Image Icon to Base64 in order to not violate Content Security Policy
newFavicon.href =
"data:image/svg+xml;base64," +
"PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNiAwQzcuMTYgMCAwIDcuMTYgMCAxNkMwIDIzLjA4IDQuNTggMjkuMDYgMTAuOTQgMzEuMThDMTEuNzQgMzEuMzIgMTIuMDQgMzAuODQgMTIuMDQgMzAuNDJDMTIuMDQgMzAuMDQgMTIuMDIgMjguNzggMTIuMDIgMjcuNDRDOCAyOC4xOCA2Ljk2IDI2LjQ2IDYuNjQgMjUuNTZDNi40NiAyNS4xIDUuNjggMjMuNjggNSAyMy4zQzQuNDQgMjMgMy42NCAyMi4yNiA0Ljk4IDIyLjI0QzYuMjQgMjIuMjIgNy4xNCAyMy40IDcuNDQgMjMuODhDOC44OCAyNi4zIDExLjE4IDI1LjYyIDEyLjEgMjUuMkMxMi4yNCAyNC4xNiAxMi42NiAyMy40NiAxMy4xMiAyMy4wNkM5LjU2IDIyLjY2IDUuODQgMjEuMjggNS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