Chrome New Webstore make available for all web browsers which support it

Make extensions in the new version of Google Chrome Webstore be available for all web browsers which support it

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Chrome New Webstore make available for all web browsers which support it
// @namespace    https://greasyfork.org/en/users/85671-jcunews
// @version      1.0.3
// @license      AGPL v3
// @author       jcunews
// @description  Make extensions in the new version of Google Chrome Webstore be available for all web browsers which support it
// @match        https://chromewebstore.google.com/*
// @grant        none
// ==/UserScript==

(t => {
  function chk(a, b, c) {
    if ((a = location.pathname.match(/^\/detail\/([^\/]+)\/(.*)/)) && (b = document.querySelector('section div[data-is-touch-wrapper]>button:not([data-forall]):disabled'))) {
      b.dataset.forall = 1;
      b.disabled = false;
      b.addEventListener("click", () => c.click());
      b.appendChild(c = document.createElement("A"));
      c.style.display = "none";
      c.href = `https://clients2.google.com/service/update2/crx?response=redirect&prodversion=100.0&acceptformat=crx2,crx3&x=id%3D${a[2]}%26uc`
    }
  }
  (new MutationObserver(() => {
    clearTimeout(t);
    t = setTimeout(chk, 200)
  })).observe(document.body, {childList: true, subtree: true});
  document.documentElement.insertAdjacentHTML("beforeend", `\
<style>
  div[role="dialog"][aria-labelledby="promo-header"],
  main>div:first-child>section:first-child>div[jscontroller][jsaction]:first-child {
    display: none;
  }
</style>`);
  chk()
})()