parent
dad0b115d6
commit
27a1d00d42
14 changed files with 4282 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||||||
|
var xhr = new XMLHttpRequest(); |
||||||
|
xhr.open('GET', 'https://dotcss.local/' + window.location.host.replace(/^www\./, '') + '.css'); |
||||||
|
|
||||||
|
xhr.onreadystatechange = function() { |
||||||
|
if(xhr.readyState == 4) { |
||||||
|
if(xhr.status == 200) { |
||||||
|
var style = document.createElement('style'); |
||||||
|
style.textContent = xhr.responseText; |
||||||
|
document.head.appendChild(style); |
||||||
|
return |
||||||
|
} else if(xhr.status == 404) { |
||||||
|
var defaultXHR = new XMLHttpRequest(); |
||||||
|
defaultXHR.open('GET', 'https://dotcss.local/default.css'); |
||||||
|
defaultXHR.onreadystatechange = function() { |
||||||
|
if (defaultXHR.readyState == 4 && defaultXHR.status == 200){ |
||||||
|
var style = document.createElement('style'); |
||||||
|
style.textContent = defaultXHR.responseText; |
||||||
|
document.head.appendChild(style); |
||||||
|
return; |
||||||
|
} |
||||||
|
} |
||||||
|
defaultXHR.send(); |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
xhr.send(); |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
@ -0,0 +1,14 @@ |
|||||||
|
{ |
||||||
|
"name" : "dotcss", |
||||||
|
"manifest_version" : 2, |
||||||
|
"version" : "2.2.0", |
||||||
|
"description" : "~/.css", |
||||||
|
"icons": { "48" : "icon48.png", "128" : "icon128.png" }, |
||||||
|
"content_scripts": [{ |
||||||
|
"all_frames" : true, |
||||||
|
"run_at" : "document_start", |
||||||
|
"matches" : ["http://*/*", "https://*/*"], |
||||||
|
"js" : ["dotcss.js"] |
||||||
|
}], |
||||||
|
"permissions": ["tabs"] |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
var xhr = new XMLHttpRequest(); |
||||||
|
xhr.open('GET', 'https://dotjs.local/' + window.location.host.replace(/^www\./, '') + '.js'); |
||||||
|
|
||||||
|
xhr.onreadystatechange = function() { |
||||||
|
if(xhr.readyState == 4) { |
||||||
|
if(xhr.status == 200) { |
||||||
|
var script = document.createElement('script'); |
||||||
|
script.textContent = xhr.responseText; |
||||||
|
document.head.appendChild(script); |
||||||
|
return; |
||||||
|
} else if(xhr.status == 404) { |
||||||
|
var defaultXHR = new XMLHttpRequest(); |
||||||
|
defaultXHR.open('GET', 'https://dotjs.local/default.js'); |
||||||
|
defaultXHR.onreadystatechange = function() { |
||||||
|
if (defaultXHR.readyState == 4 && defaultXHR.status == 200){ |
||||||
|
var script = document.createElement('script'); |
||||||
|
script.textContent = defaultXHR.responseText; |
||||||
|
document.head.appendChild(script); |
||||||
|
return; |
||||||
|
} |
||||||
|
} |
||||||
|
defaultXHR.send(); |
||||||
|
} |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
xhr.send(); |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 922 B |
@ -0,0 +1,14 @@ |
|||||||
|
{ |
||||||
|
"name" : "dotjs", |
||||||
|
"manifest_version" : 2, |
||||||
|
"version" : "2.2.0", |
||||||
|
"description" : "~/.js", |
||||||
|
"icons": { "48" : "icon48.png", "128" : "icon128.png" }, |
||||||
|
"content_scripts": [{ |
||||||
|
"all_frames" : true, |
||||||
|
"run_at" : "document_start", |
||||||
|
"matches" : ["http://*/*", "https://*/*"], |
||||||
|
"js" : ["dotjs.js"] |
||||||
|
}], |
||||||
|
"permissions": ["tabs"] |
||||||
|
} |
@ -0,0 +1,4 @@ |
|||||||
|
body{ |
||||||
|
background-color: #2d3242; |
||||||
|
color: white; |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@ |
|||||||
|
google.com.css |
Loading…
Reference in new issue