We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is my workaround for adblockers. Thought I'd put it on here so that anyone looking in the future can find a quick solution.
async function hasAdblock() { var hasAdblock = false; var testAd = document.createElement('div'); testAd.innerHTML = ' '; testAd.className = 'ads ad adsbox doubleclick ad-placement carbon-ads'; document.body.appendChild(testAd); await new Promise(resolve => { setTimeout(() => { testAd.offsetHeight === 0 && (hasAdblock = true); testAd.remove(); resolve(); }, 100); }); return hasAdblock; };
Usage:
hasAdblock().then(value => value ? pdf.download() : pdf.open());
If an adblocker is installed, download, otherwise open.
Are there ways to tag a post? "pdfmake open not working" "pdfmake print not working"
The text was updated successfully, but these errors were encountered:
See #800 (comment)
Sorry, something went wrong.
No branches or pull requests
This is my workaround for adblockers. Thought I'd put it on here so that anyone looking in the future can find a quick solution.
Usage:
If an adblocker is installed, download, otherwise open.
Are there ways to tag a post? "pdfmake open not working" "pdfmake print not working"
The text was updated successfully, but these errors were encountered: