Show a newly installed style in popups
This commit is contained in:
parent
d4382d3f08
commit
5b0d8fbba0
4
popup.js
4
popup.js
|
@ -177,6 +177,10 @@ function handleUpdate(style) {
|
||||||
var styleElement = installed.querySelector("[style-id='" + style.id + "']");
|
var styleElement = installed.querySelector("[style-id='" + style.id + "']");
|
||||||
if (styleElement) {
|
if (styleElement) {
|
||||||
installed.replaceChild(createStyleElement(style), styleElement);
|
installed.replaceChild(createStyleElement(style), styleElement);
|
||||||
|
} else if (chrome.extension.getBackgroundPage().getApplicableSections(style, location.href).length) {
|
||||||
|
// a new style for the current url is installed
|
||||||
|
document.getElementById("unavailable").style.display = "none";
|
||||||
|
installed.appendChild(createStyleElement(style));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user