How to detect extension on a browser?
问题 I'm trying to detect if an extension is installed on a user's browser. I tried this: var detect = function(base, if_installed, if_not_installed) { var s = document.createElement('script'); s.onerror = if_not_installed; s.onload = if_installed; document.body.appendChild(s); s.src = base + '/manifest.json'; } detect('chrome-extension://' + addon_id_youre_after, function() {alert('boom!');}); If the browser has the extension installed I will get an error like: Resources must be listed in the web