window.consentApi.unblock: Check if a given URL / string is blocked by a Content Blocker:
window.consentApi.unblock
Example (ES5):
(window.consentApi && window.consentApi.unblock("player.vimeo.com") || Promise.resolve()).then(function() { console.log("Consent for Vimeo given, unlock content...!"); });
Example (ES6, Babel, TS):
(window.consentApi?.unblock("player.vimeo.com") || Promise.resolve()).then(() => { console.log("Consent for Vimeo given, unlock content...!"); });
Create a visual content blocker to a given HTML element
Generated using TypeDoc
window.consentApi.unblock
: Check if a given URL / string is blocked by a Content Blocker:Example (ES5):
(window.consentApi && window.consentApi.unblock("player.vimeo.com") || Promise.resolve()).then(function() { console.log("Consent for Vimeo given, unlock content...!"); });
Example (ES6, Babel, TS):
(window.consentApi?.unblock("player.vimeo.com") || Promise.resolve()).then(() => { console.log("Consent for Vimeo given, unlock content...!"); });