(href, extensionId = undefined)
| 72 | } |
| 73 | |
| 74 | function buildExtensionUrl(href, extensionId = undefined) { |
| 75 | extensionId = extensionId || getExtensionId(href); |
| 76 | if (extensionId == undefined) return; |
| 77 | if (is_cws.test(href) || is_ncws.test(href)) { |
| 78 | var chromeVersion = /Chrome\/([0-9.]+)/.exec(navigator.userAgent)[1]; |
| 79 | return ( |
| 80 | "https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=" + |
| 81 | chromeVersion + |
| 82 | "&x=id%3D" + |
| 83 | extensionId + |
| 84 | "%26installsource%3Dondemand%26uc" |
| 85 | ); |
| 86 | } |
| 87 | if (is_ows.test(href)) { |
| 88 | return ( |
| 89 | "https://addons.opera.com/extensions/download/" + extensionId + "/" |
| 90 | ); |
| 91 | } |
| 92 | if (is_ews.test(href)) { |
| 93 | return ( |
| 94 | "https://edge.microsoft.com/extensionwebstorebase/v1/crx?response=redirect&x=id%3D" + |
| 95 | extensionId + |
| 96 | "%26installsource%3Dondemand%26uc" |
| 97 | ); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | function promptInstall( |
| 102 | crx_url, |
no test coverage detected