Improve content script injection (#240)

* Improve content script injection

* Add an error handler for content script injection

* Use a guard variable in the content script, instead

* Fix comment

* Ensure tabID is unchanged; fix image styles

* Only inject script once; use CSS to hide page

* Display an error when the script can't be executed; document other limitations

* Log error on script execute failure
This commit is contained in:
wbamberg
2017-11-01 11:25:34 -07:00
committed by GitHub
parent 8978d251a3
commit 37cb9f7a84
5 changed files with 166 additions and 89 deletions

View File

@@ -2,6 +2,10 @@ html, body {
width: 100px;
}
.hidden {
display: none;
}
.button {
margin: 3% auto;
padding: 4px;
@@ -18,10 +22,10 @@ html, body {
background-color: #E5F2F2;
}
.clear {
.reset {
background-color: #FBFBC9;
}
.clear:hover {
.reset:hover {
background-color: #EAEA9D;
}