fix(browser-extension): not forcing styles
This commit is contained in:
parent
55f3c51edf
commit
93e7d9619a
@ -106,17 +106,15 @@ function forceClean(element) {
|
||||
*/
|
||||
function forceElementStyles(mutations, observer) {
|
||||
for (const mutation of mutations) {
|
||||
if (mutation.type === 'attributes' && dataAttributeName === mutation.attributeName) {
|
||||
const element = mutation.target;
|
||||
const value = element.getAttribute(dataAttributeName);
|
||||
const element = mutation.target;
|
||||
const value = element.getAttribute(dataAttributeName);
|
||||
|
||||
if (value === null) {
|
||||
observer.disconnect();
|
||||
element.removeAttribute(dataAttributeName);
|
||||
element.style.removeProperty('display');
|
||||
} else {
|
||||
element.style.setProperty('display', 'none', 'important');
|
||||
}
|
||||
if (value === null) {
|
||||
observer.disconnect();
|
||||
element.removeAttribute(dataAttributeName);
|
||||
element.style.removeProperty('display');
|
||||
} else {
|
||||
element.style.setProperty('display', 'none', 'important');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user