Permalink
Browse files

refactor

  • Loading branch information...
chjj committed Jul 31, 2011
1 parent 421ca54 commit f9c043c96be29e6ae32842d79d320d85ce43ad02
View
0 CHANGELOG.md 100755 → 100644
No changes.
View
0 LICENSE 100755 → 100644
No changes.
View
0 README.md 100755 → 100644
No changes.
View
13 background.html 100755 → 100644
@@ -1,5 +1,9 @@
<!doctype html><title></title><script>(function() {
+/**
+ * Background
+ */
+
// make the icon functional
chrome.browserAction.onClicked.addListener(function(tab) {
chrome.tabs.sendRequest(tab.id, {toggle: true});
@@ -8,12 +12,16 @@
// a simple get request
chrome.extension.onRequest.addListener(function(req, sender, send) {
if (!req.get) return;
- var xhr = new XMLHttpRequest();
- var timeout = setTimeout(function() {
+
+ var xhr = new XMLHttpRequest()
+ , timeout;
+
+ timeout = setTimeout(function() {
xhr.onreadystatechange = function() {};
xhr.abort();
send({err:'Timeout.'});
}, 5000);
+
xhr.onreadystatechange = function() {
if (+xhr.readyState === 4) {
clearTimeout(timeout);
@@ -24,6 +32,7 @@
}
}
};
+
xhr.open('GET', req.get, true);
xhr.send();
});
View
0 design/icon128.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 design/icon19.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
14 design/iframe.css 100755 → 100644
@@ -1,7 +1,13 @@
+/**
+ * Form Controls
+ */
+
html, body { margin: 0; padding: 0; overflow: hidden; }
div {
- height: 20px; margin: 0; padding: 5px; border-top: #b6bac0 solid 1px; font: 12px/1 verdana, sans-serif;
+ height: 20px; margin: 0; padding: 5px;
+ border-top: #b6bac0 solid 1px;
+ font: 12px/1 verdana, sans-serif;
background: -webkit-gradient(linear, 0% 100%, 0% 0%, color-stop(0.1, #e5e5e5), color-stop(1.0, #fff));
background: linear-gradient(90deg, #e5e5e5 10%, #fff 100%)
}
@@ -21,8 +27,10 @@ div > label > input {
}
textarea {
- height: 219px; width: 100%; padding: 5px; margin: 0;
+ height: 219px; width: 100%;
+ padding: 5px; margin: 0;
resize: none; font: 11px/1.4 monospace;
- border: #b6bac0 solid 1px; background: #fff;
+ border: #b6bac0 solid 1px;
+ background: #fff;
outline: none !important;
}
View
4 design/style.css 100755 → 100644
@@ -1,3 +1,7 @@
+/**
+ * Frame
+ */
+
[id="LIVE.STYLESHEETS"] {
outline: 0; border: 0; margin: 0; padding: 0; overflow: hidden;
position: fixed; z-index: 10000; top: auto; right: 0; bottom: 0; left: 0;
Oops, something went wrong.

0 comments on commit f9c043c

Please sign in to comment.