forked from desandro/neo-vision
-
Notifications
You must be signed in to change notification settings - Fork 1
/
background.html
24 lines (22 loc) · 888 Bytes
/
background.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<style id="default-theme" media="none">/* made for Neo-vision */
.str { color: #1A6; background: hsla( 120, 100%, 50%, 0.05); border-radius: 0.3em; } /* string */
.kwd { color: #D50; } /* keyword */
.com { color: #D9B; font-style: italic; } /* comment */
.typ { color: #F0D; font-weight: bold; } /* type: JS constructors */
.lit { color: #48E; } /* literal: numbers, CSS values */
.pun { color: #963; } /* punctuation */
.pln { color: #755; } /* plain text */
</style>
<script>
var defaultTheme = document.getElementById('default-theme').textContent;
chrome.extension.onRequest.addListener( function(request, sender, sendResponse) {
switch ( request.method ) {
case 'getStyle' :
var style = localStorage['neoVisionStyle'] || defaultTheme;
sendResponse( style );
break;
default :
sendResponse(); // snub them.
}
});
</script>