Get rid of flicker
This commit is contained in:
parent
896cd7960c
commit
4b46a2988b
@ -1,11 +1,7 @@
|
||||
(function() {
|
||||
var template = Handlebars.template, templates = Handlebars.templates = Handlebars.templates || {};
|
||||
templates['footer.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper;
|
||||
|
||||
return " <script src=\""
|
||||
+ container.escapeExpression(((helper = (helper = helpers.root || (depth0 != null ? depth0.root : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"root","hash":{},"data":data}) : helper)))
|
||||
+ "/js/popup.js\"></script>\n </body>\n</html>\n";
|
||||
return " </body>\n</html>\n";
|
||||
},"useData":true});
|
||||
templates['header.html'] = template({"compiler":[7,">= 4.0.0"],"main":function(container,depth0,helpers,partials,data) {
|
||||
var helper;
|
||||
|
@ -63,9 +63,14 @@ class Popup {
|
||||
}
|
||||
|
||||
setContent(content) {
|
||||
if (this.popup !== null) {
|
||||
this.popup.setAttribute('srcdoc', content);
|
||||
if (this.popup === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const doc = this.popup.contentDocument;
|
||||
doc.open();
|
||||
doc.write(content);
|
||||
doc.close();
|
||||
}
|
||||
|
||||
inject() {
|
||||
|
@ -20,7 +20,7 @@
|
||||
"background": {"page": "bg/background.html"},
|
||||
"options_page": "bg/options.html",
|
||||
"permissions": ["storage"],
|
||||
"web_accessible_resources": ["fg/css/popup.css", "fg/js/popup.js"],
|
||||
"web_accessible_resources": ["fg/css/popup.css"],
|
||||
|
||||
"content_scripts": [{
|
||||
"matches": ["*://*/*"],
|
||||
|
@ -1,3 +1,2 @@
|
||||
<script src="{{root}}/js/popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user