Then I found this gem from Gildas on the Chromium forums, which attempts to load an image resource from the extension:
function detectExtension( extensionId, callback )
{
var img;
img = new Image();
img.src = "chrome-extension://" + extensionId + "/icon16.png";
img.onload = function() { callback( true ); };
img.onerror = function() { callback( false ); };
}
Works a treat - just make sure that the file referenced, icon16.png in this case, is present in your extension folder.
Please Log In to leave comments...