Auto-close Pro dialogs
A script detects Canva Pro upsell dialogs and clicks their own close button.
Code to copy
try {
var check = function () {
var dialogs = document.querySelectorAll('[role="dialog"]');
dialogs.forEach(function (d) {
var label = (d.getAttribute('aria-label') || '').toLowerCase();
var txt = (d.textContent || '').toLowerCase();
if (label.indexOf('upgrade') > -1 ||
txt.indexOf('upgrade to canva pro') > -1) {
var btn = d.querySelector('[aria-label*="Close" i],[aria-label*="Dismiss" i]');
if (btn) { btn.click(); }
}
});
};
check();
var mo = new MutationObserver(check);
if (document.body) {
mo.observe(document.body, { childList: true, subtree: true });
}
} catch (e) {
console.warn('Canva pro dialog auto-close failed:', e);
}
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's JavaScript panel and save — it runs on every page visit.
Rate this example
No ratings yet — be the first.