diff --git a/platform/chromium/vapi-client.js b/platform/chromium/vapi-client.js
index 5285e9338..dd954e20c 100644
--- a/platform/chromium/vapi-client.js
+++ b/platform/chromium/vapi-client.js
@@ -142,25 +142,24 @@ vAPI.setTimeout = vAPI.setTimeout || self.setTimeout.bind(self);
/******************************************************************************/
-vAPI.shutdown = (function() {
- var jobs = [];
-
- var add = function(job) {
- jobs.push(job);
- };
-
- var exec = function() {
+vAPI.shutdown = {
+ jobs: [],
+ add: function(job) {
+ this.jobs.push(job);
+ },
+ exec: function() {
var job;
- while ( (job = jobs.pop()) ) {
+ while ( (job = this.jobs.pop()) ) {
job();
}
- };
-
- return {
- add: add,
- exec: exec
- };
-})();
+ },
+ remove: function(job) {
+ var pos;
+ while ( (pos = this.jobs.indexOf(job)) !== -1 ) {
+ this.jobs.splice(pos, 1);
+ }
+ }
+};
/******************************************************************************/
/******************************************************************************/
diff --git a/platform/firefox/vapi-client.js b/platform/firefox/vapi-client.js
index 1523989f0..8eb7f83dd 100644
--- a/platform/firefox/vapi-client.js
+++ b/platform/firefox/vapi-client.js
@@ -123,26 +123,24 @@ vAPI.setTimeout = vAPI.setTimeout || function(callback, delay, extra) {
/******************************************************************************/
-vAPI.shutdown = (function() {
- var jobs = [];
-
- var add = function(job) {
- jobs.push(job);
- };
-
- var exec = function() {
- //console.debug('Shutting down...');
+vAPI.shutdown = {
+ jobs: [],
+ add: function(job) {
+ this.jobs.push(job);
+ },
+ exec: function() {
var job;
- while ( (job = jobs.pop()) ) {
+ while ( (job = this.jobs.pop()) ) {
job();
}
- };
-
- return {
- add: add,
- exec: exec
- };
-})();
+ },
+ remove: function(job) {
+ var pos;
+ while ( (pos = this.jobs.indexOf(job)) !== -1 ) {
+ this.jobs.splice(pos, 1);
+ }
+ }
+};
/******************************************************************************/
diff --git a/src/epicker.html b/src/epicker.html
index 6f4cdc48a..0e15e0a19 100644
--- a/src/epicker.html
+++ b/src/epicker.html
@@ -56,12 +56,14 @@ section {
border: 0;
box-sizing: border-box;
display: inline-block;
- position: relative;
width: 100%;
}
-section > textarea {
+section > div {
+ position: relative;
+}
+section > div > textarea {
background-color: #fff;
- border: 1px solid #ccc;
+ border: 1px solid #aaa;
box-sizing: border-box;
font: 11px monospace;
height: 6em;
@@ -70,15 +72,22 @@ section > textarea {
resize: none;
width: 100%;
}
-section > div {
+section > div > textarea.invalidFilter {
+ background-color: #fee;
+}
+section > div > textarea + div {
+ background-color: #aaa;
+ bottom: 0;
+ color: white;
+ padding: 2px 4px;
+ position: absolute;
+ right: 0;
+}
+section > div + div {
direction: ltr;
margin: 2px 0;
text-align: right;
}
-section > div > span:last-of-type {
- position: absolute;
- right: 0;
-}
ul {
padding: 0;
list-style-type: none;
@@ -137,8 +146,12 @@ svg > path + path {
body.preview svg > path {
fill: rgba(0,0,0,0.10);
}
+body.preview svg > path + path {
+ stroke: none;
+}
aside {
background-color: #eee;
+ border: 1px solid #aaa;
bottom: 4px;
box-sizing: border-box;
visibility: hidden;
@@ -162,7 +175,10 @@ body.paused > aside:hover {