feat(content): add support for onetrust
This commit is contained in:
parent
f3cf94afa7
commit
74120d382a
@ -12,6 +12,7 @@ if (typeof chrome.app.isInstalled !== 'undefined') {
|
||||
|
||||
// Inject buttons
|
||||
const doMagic = () => {
|
||||
// Quantcast
|
||||
const notRemovableElements = Array.from(document.getElementsByClassName("qc-cmp-ui-showing"));
|
||||
notRemovableElements.forEach(element => {
|
||||
element.classList.remove("qc-cmp-ui-showing");
|
||||
@ -21,6 +22,10 @@ if (typeof chrome.app.isInstalled !== 'undefined') {
|
||||
removableElements.forEach(element => {
|
||||
element.remove();
|
||||
});
|
||||
|
||||
// OneTrust
|
||||
const removableElement = document.getElementById("onetrust-consent-sdk");
|
||||
if (!!removableElement) removableElement.remove();
|
||||
};
|
||||
|
||||
// Observer starts observe when call this function
|
||||
@ -35,4 +40,4 @@ if (typeof chrome.app.isInstalled !== 'undefined') {
|
||||
// Then...
|
||||
doMagic();
|
||||
observe();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user