show global styles for frames if main page is blocked

fixes #1183
This commit is contained in:
tophf 2021-02-16 17:03:18 +03:00
parent 58ae4704b2
commit a674874861

View File

@ -15,6 +15,7 @@
'use strict';
let tabURL;
let isBlocked;
/** @type Element */
const installed = $('#installed');
@ -285,6 +286,7 @@ function sortStyles(entries) {
function showStyles(frameResults) {
const entries = new Map();
frameResults.forEach(({styles = [], url}, index) => {
if (isBlocked && !index) return;
styles.forEach(style => {
const {id} = style;
if (!entries.has(id)) {
@ -421,7 +423,8 @@ function handleDelete(id) {
}
}
function blockPopup(isBlocked = true) {
function blockPopup(val = true) {
isBlocked = val;
document.body.classList.toggle('blocked', isBlocked);
if (isBlocked) {
document.body.prepend(t.template.unavailableInfo);