var extLoaded = true; document.getElementById('ext').textContent = 'external script OK'; console.log('external script: ' + location.href);