Answer the question
In order to leave comments, you need to log in
How to install the Chrome add-on from a third party site?
Hello.
Actually, the installation is of interest, as the guys from 2GIS did - apps.2gis.ru/#extension
The link on the "Install" button leads to the Web Store, but the installation takes place immediately on the page.
Answer the question
In order to leave comments, you need to log in
Actually HTML from the page with data-attributes.
JS that hangs a handler on a link click. Checks the browser, sends statistics to Google Analytics and triggers the installation.
$(".lng__download-btn, .lng__extensions-btn")
.on("click", function(a){
var c = $(this).data("type"),
e = $(this).data("location"),
f = $(this).data("browser");
f ? (
_gaq.push(["_trackEvent", c, "Download " + e, f]), !1 == /.com/.test(d) &&
(b && "Chrome" == b || "YaBrowser" == b) &&
(a.preventDefault(), chrome.webstore.install())
)
: _gaq.push(["_trackEvent",c,"Download "+e])
})
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question