    (function () {
        var url = (window.paintopsReactivateCfg && window.paintopsReactivateCfg.url) || '';
        function swap() {
            var els = document.querySelectorAll('a, button');
            var noted = document.querySelector('.paintops-reactivate-note');
            for (var i = 0; i < els.length; i++) {
                var t = (els[i].textContent || '').trim();
                var hit = false;
                if (t === 'Upgrade to Pro') {
                    els[i].textContent = 'Reactivate License';
                    if (els[i].tagName === 'A') { els[i].href = url; }
                    hit = true;
                } else if (t.indexOf('Go unlimited with Pro') === 0) {
                    els[i].textContent = 'Reactivate your Pro license';
                    if (els[i].tagName === 'A') { els[i].href = url; }
                    hit = true;
                }
                if (hit && !noted) {
                    noted = document.createElement('p');
                    noted.className = 'paintops-reactivate-note';
                    noted.style.cssText = 'margin:8px 0 0;font-weight:700;';
                    noted.textContent = 'Reactivate in Plugins, under PaintOps: use the Activate License link.';
                    if (els[i].parentNode) { els[i].parentNode.appendChild(noted); }
                }
            }
        }
        if (document.readyState === 'loading') {
            document.addEventListener('DOMContentLoaded', swap);
        } else {
            swap();
        }
    })();
