parent
58ae4704b2
commit
a674874861
|
@ -15,6 +15,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
let tabURL;
|
let tabURL;
|
||||||
|
let isBlocked;
|
||||||
|
|
||||||
/** @type Element */
|
/** @type Element */
|
||||||
const installed = $('#installed');
|
const installed = $('#installed');
|
||||||
|
@ -285,6 +286,7 @@ function sortStyles(entries) {
|
||||||
function showStyles(frameResults) {
|
function showStyles(frameResults) {
|
||||||
const entries = new Map();
|
const entries = new Map();
|
||||||
frameResults.forEach(({styles = [], url}, index) => {
|
frameResults.forEach(({styles = [], url}, index) => {
|
||||||
|
if (isBlocked && !index) return;
|
||||||
styles.forEach(style => {
|
styles.forEach(style => {
|
||||||
const {id} = style;
|
const {id} = style;
|
||||||
if (!entries.has(id)) {
|
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);
|
document.body.classList.toggle('blocked', isBlocked);
|
||||||
if (isBlocked) {
|
if (isBlocked) {
|
||||||
document.body.prepend(t.template.unavailableInfo);
|
document.body.prepend(t.template.unavailableInfo);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user