-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglitter.user.js
31 lines (25 loc) · 1.02 KB
/
glitter.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 Glitter
// @namespace http://mammil.com
// @description Glitter is a greasemonkey script that allows users to modify the look and feel of Twitter.
// @include http://twitter.com/
// @include http://twitter.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js
// ==/UserScript==
var docHead = document.getElementsByTagName('head')[0];
var docBody = document.getElementsByTagName('body')[0];
// add custom style
var customStyle = document.createElement('link');
customStyle.href = 'http://mammil.com/glitter/themes/svelte/style.css';
customStyle.type = 'text/css';
customStyle.rel = 'stylesheet';
customStyle.id = 'customStyle';
docHead.appendChild(customStyle);
// add custom script
function addScript() {
var customScript = document.createElement('script');
customScript.src = 'http://mammil.com/glitter/themes/svelte/script.js';
customScript.type = 'text/javascript';
customScript.id = 'customScript';
docBody.appendChild(customScript);
}