feat(content): add support for onetrust

This commit is contained in:
wanhose 2020-04-24 19:42:06 +02:00 committed by wanhose
parent f3cf94afa7
commit 74120d382a

View File

@ -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();
}
}