-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plex - Apple Touch Icon.user.js
31 lines (25 loc) · 1.27 KB
/
Plex - Apple Touch Icon.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
25
26
27
28
29
30
31
// ==UserScript==
// @name Apple Touch Icon: Plex
// @author J.P. Cranford
// @version 1.0
// @description Currently, the touch icon for app.plex.tv is their white icon on a black background. Their main site, www.plex.tv, has a touch icon with their yellow icon. This script changes all touch icons for *.plex.tv to that one.
// @match *://*.plex.tv/*
// @supportURL https://github.com/jpcranford/userscripts/issues
// @run-at document-start
// ==/UserScript==
window.addEventListener("load", function() {
var head = document.getElementsByTagName('head')[0];
var icon = document.createElement('link');
icon.setAttribute('rel', 'apple-touch-icon');
icon.setAttribute('sizes', '144x144');
icon.setAttribute('href', 'https://www.plex.tv/wp-content/themes/plex/assets/img/favicons/apple-touch-icon-144x144.png');
head.appendChild(icon);
});
window.addEventListener("load", function() {
var head = document.getElementsByTagName('head')[0];
var icon = document.createElement('link');
icon.setAttribute('rel', 'apple-touch-icon');
icon.setAttribute('sizes', '152x152');
icon.setAttribute('href', 'https://www.plex.tv/wp-content/themes/plex/assets/img/favicons/apple-touch-icon-152x152.png');
head.appendChild(icon);
});