feat(content): add support for ens
This commit is contained in:
parent
9de120b39b
commit
86167aa540
@ -1,16 +1,16 @@
|
|||||||
if (typeof chrome.app.isInstalled !== 'undefined') {
|
if (typeof chrome.app.isInstalled !== 'undefined') {
|
||||||
// Observer
|
// Observer
|
||||||
const observer = new MutationObserver((mutations, observer) => {
|
const observer = new MutationObserver((mutations, observer) => {
|
||||||
for (let mutation of mutations) {
|
mutations.forEach(mutation => {
|
||||||
if (mutation.type === 'childList') {
|
if (mutation.type === 'childList') {
|
||||||
observer.disconnect();
|
observer.disconnect();
|
||||||
doMagic();
|
doMagic();
|
||||||
observe();
|
observe();
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Inject buttons
|
// Remover
|
||||||
const doMagic = () => {
|
const doMagic = () => {
|
||||||
// Quantcast
|
// Quantcast
|
||||||
const notRemovableElements = Array.from(document.getElementsByClassName("qc-cmp-ui-showing"));
|
const notRemovableElements = Array.from(document.getElementsByClassName("qc-cmp-ui-showing"));
|
||||||
@ -23,8 +23,14 @@ if (typeof chrome.app.isInstalled !== 'undefined') {
|
|||||||
element.remove();
|
element.remove();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let removableElement = null;
|
||||||
|
|
||||||
|
// ENS
|
||||||
|
removableElement = document.getElementById("ensNotifyBanner");
|
||||||
|
if (!!removableElement) removableElement.remove();
|
||||||
|
|
||||||
// OneTrust
|
// OneTrust
|
||||||
const removableElement = document.getElementById("onetrust-consent-sdk");
|
removableElement = document.getElementById("onetrust-consent-sdk");
|
||||||
if (!!removableElement) removableElement.remove();
|
if (!!removableElement) removableElement.remove();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user