-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.js
More file actions
43 lines (33 loc) · 3.16 KB
/
Copy pathstyles.js
File metadata and controls
43 lines (33 loc) · 3.16 KB
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
32
33
34
35
36
37
38
39
40
41
42
// Function from "Dive Into Greasemonkey"
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
var button_css = "button,.bcq_button {font: bold 13px Helvetica,Arial,sans-serif;background: url('https://read.amazon.com/static/app/010407152/t_2013_04_03_12_35_41/r9aaeQBsWR73/images/background/main/horizontal/btn-noise-bg.png') repeat scroll 0 0 #494949;border: 1px solid #2A2A2A;border-radius: 6px;box-shadow: 0 1px 1px #999999 inset;color: #FFFFFF;display: inline-block;float: none;margin-left: 5px;margin-right: 5.2px;margin-top: 6.5px;margin-bottom: 6.5px;opacity: 1;padding-top: 5.2px;padding-bottom: 5.2px; padding-left: 13px;padding-right: 13px;text-decoration: none;text-shadow: 0 1px 0 #000000;cursor: pointer;border-style: solid;border-top-width: 1px;border-bottom-width: 1px;border-right-width: 1px; border-left-width: 1px;} .ui-state-default{background: url(images/ui-bg_glass_20_555555_1x400.png') repeat-x scroll 50% 50% #555555;border: 1px solid #666666;color: #EEEEEE;font-weight: bold;} .ui-widget {font-family: Helvetica,Arial,sans-serif;font-size: 1em;font-weight: bold;} .ui-button {cursor: pointer;display: inline-block;margin-right: 0.1em;overflow: visible;padding: 4px;position: relative;text-align: center;text-decoration: none !important;} .ui-state-default {background: url('images/ui-bg_glass_20_555555_1x400.png') repeat-x scroll 50% 50% #555555;border: 1px solid #666666;color: #EEEEEE;font-weight: bold;}";
//var button_text_css = ".ui-button-text {} .ui-button-text-only .ui-button-text {padding: 0.4em 1em;} .ui-button .ui-button-text {display: block;line-height: 1.4;}"
function addStyles() {
// add custom styles
//Button
addGlobalStyle(button_css);
//addGlobalStyle(button_text_css);
// Usernames
addGlobalStyle('.bcq_usrname {color:grey;font-size:small;font-style:italic;}');
// Error messages
addGlobalStyle('.bcq_ermsg {color:red;font-size:small;font-style:italic;margin:5px 0;}');
addGlobalStyle('#question_forum .bcq_ermsg {color:#f88;}');
addGlobalStyle('.bcq_sucmsg {color:green;font-size:small;font-style:italic;margin:5px 0;}');
addGlobalStyle('#question_forum .bcq_sucmsg {color:#8f8;}');
addGlobalStyle('#question_content,#bcq_poseform,textarea {font-family:Helvetica,Arial,sans-serif;}');
addGlobalStyle('#question_forum {margin:auto;padding:15px;color:white;} #question_content {background-color:#2A2A2A}');
addGlobalStyle('.bcq_q h4 {margin:6px 0px;} .bcq_q ul {margin:0 0 4px;padding-left:20px;} .bcq_q_inner {margin-left:30px;margin-bottom:15px;}');
// GoTo button
addGlobalStyle('.bcq_goto {font-size:small;color:#99f;display:block;margin:auto;} .bcq_goto:hover {text-decoration:underline;}');
// Question expansion
//.bcq_hcontracted {display:block;max-height:40px;text-overflow:ellipsis;} .bcq_hexpanded {display:inline;}
addGlobalStyle('.bcq_qcontracted .bcq_q_inner {display:none;} .bcq_qcontracted h4:before {content:"[+] ";font-weight:normal;font-family:monospace;} .bcq_qexpanded h4:before {content:"[-] ";font-weight:normal;font-family:monospace;}');
}