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

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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()
})()