Hello.

Frankly I do not know and many do not know how to identify whether there are betterways to do this, and correct, but I’m sure that there will be. However, my code isperfectly copes with this task.

https://wrongscript.wordpress.com/2011/11/17/chrome-extension/

when i make this extension, i want create download link in my website.

if user downloaded this extension (crx file) and user use this my chrom extension, i dont want create download link in my webpage.

for simply, in my website is index.html and there is content

<div id=”chrome_extension”>

   <div ….

                   <a href=”example.crx”></a>

        </div>

</div>

and i have extension.js file, with content (Jquery):

$(function() {

if($.browser.safari) {}; // if it is not chrome browser, i dont want chrome extension!

//and check extension image, for my chrome extension

var img;
img = new Image();
img.src = “chrome-extension://” + “AAAPPAAPAPA” + “/logo.png”;

// it is extension logo address. and  “AAAPPAAPAPA” <- is extension unique ID.

// and then

img.onload = function() { 
     $(“#chrome_extension”).hide();
};

// if image logo is load, if for this unique id isset logo.png – dont want this extension!

});

Sorry again for my shirt english : )

BEST REGARDS 😉

Advertisements