Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fix(stupidity): tarteaucitron was breaking google docs
Browse files Browse the repository at this point in the history
Closes #25
  • Loading branch information
mathkr committed Feb 27, 2020
1 parent 96fe21a commit 8697cbe
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 51 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.idea

bundle.zip
*.zip
*.swp
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 1.5.1

## Bug fixes

- TarteAuCitron broke Google Docs (issue #25)

# 1.5.0

## Features
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Mathieu Kim Robin",
"name": "Never-Consent",
"description": "Never consent to any GDPR consent management platform",
"version": "1.5.0",
"version": "1.5.1",
"icons": {
"16": "assets/16.ico",
"48": "assets/48.ico",
Expand Down
103 changes: 54 additions & 49 deletions src/nc.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,69 +50,74 @@
let kickCmpmngr = 0;

const kick = setInterval(function () {
// Didomi
if (!!window.Didomi) {
window.Didomi.setUserDisagreeToAll();
clearInterval(kick);
}
try {
// Didomi
if (!!window.Didomi) {
window.Didomi.setUserDisagreeToAll();
clearInterval(kick);
}

// consentmanager
if (!!window.cmpmngr) {
kickCmpmngr += 1;
window.cmpmngr.setConsentViaBtn(0);
// consentmanager
if (!!window.cmpmngr) {
kickCmpmngr += 1;
window.cmpmngr.setConsentViaBtn(0);

// Because they are like a man, they have to heard too much times "nope" to understand "nope"
if (5 === kickCmpmngr) {
clearInterval(kick);
// Because they are like a man, they have to heard too much times "nope" to understand "nope"
if (5 === kickCmpmngr) {
clearInterval(kick);
}
}
}

// cookielawinfo
if (!!window.CLI && !!window.CLI.reject_close) {
CLI.reject_close();
clearInterval(kick);
}
// cookielawinfo
if (!!window.CLI && !!window.CLI.reject_close) {
CLI.reject_close();
clearInterval(kick);
}

// tarteaucitron
if (!!tarteaucitron) {
tarteaucitron.userInterface.respondAll(false);
clearInterval(kick);
}
// tarteaucitron
if (!!window.tarteaucitron) {
tarteaucitron.userInterface.respondAll(false);
clearInterval(kick);
}

// crownpeak
if (!!window.evidon) {
elClick('.evidon-consent-button-text');
window.evidon.preferencesDialog.doWithdrawConsent();
document.querySelector('#_evh-button').remove();
clearInterval(kick);
}
// crownpeak
if (!!window.evidon) {
elClick('.evidon-consent-button-text');
window.evidon.preferencesDialog.doWithdrawConsent();
document.querySelector('#_evh-button').remove();
clearInterval(kick);
}

// sirdata
if (!!window.Sddan && window.Sddan.cmpLoaded) {
elClick('.sd-cmp-1Q99t', () => {
elClick('.sd-cmp-2DJbe', () => {
elClick('.sd-cmp-2F7Cs', () => clearInterval(kick));
// sirdata
if (!!window.Sddan && window.Sddan.cmpLoaded) {
elClick('.sd-cmp-1Q99t', () => {
elClick('.sd-cmp-2DJbe', () => {
elClick('.sd-cmp-2F7Cs', () => clearInterval(kick));
});
});
});

}
}

// platform behind seloger.com, french flat search engine, still don't know wich one it is
if (!!window.theShield) {
fireEvent('#banner-cookie_customize', 'mousedown');
// platform behind seloger.com, french flat search engine, still don't know wich one it is
if (!!window.theShield) {
fireEvent('#banner-cookie_customize', 'mousedown');

const switchBoxes = document.querySelectorAll('.slshield-switch input');
const switchBoxes = document.querySelectorAll('.slshield-switch input');

if (switchBoxes.length) {
switchBoxes
.forEach(checkbox => {
if (checkbox.checked) {
checkbox.click();
}
});
if (switchBoxes.length) {
switchBoxes
.forEach(checkbox => {
if (checkbox.checked) {
checkbox.click();
}
});

elClick('.slshield-info__cta.slshield-info__cta-accept', () => clearInterval(kick));
elClick('.slshield-info__cta.slshield-info__cta-accept', () => clearInterval(kick));
}
}
} catch (except) {
console.error('[extension:Never-Consent] encountered a problem, please open an issue here https://github.com/MathRobin/Never-Consent/issues');
console.error('[extension:Never-Consent]', except);
}
}, 100);

Expand Down

0 comments on commit 8697cbe

Please sign in to comment.