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

  1. // ==UserScript==
  2. // @name Chrome New Webstore make available for all web browsers which support it
  3. // @namespace https://greasyfork.org/en/users/85671-jcunews
  4. // @version 1.0.3
  5. // @license AGPL v3
  6. // @author jcunews
  7. // @description Make extensions in the new version of Google Chrome Webstore be available for all web browsers which support it
  8. // @match https://chromewebstore.google.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (t => {
  13. function chk(a, b, c) {
  14. if ((a = location.pathname.match(/^\/detail\/([^\/]+)\/(.*)/)) && (b = document.querySelector('section div[data-is-touch-wrapper]>button:not([data-forall]):disabled'))) {
  15. b.dataset.forall = 1;
  16. b.disabled = false;
  17. b.addEventListener("click", () => c.click());
  18. b.appendChild(c = document.createElement("A"));
  19. c.style.display = "none";
  20. c.href = `https://clients2.google.com/service/update2/crx?response=redirect&prodversion=100.0&acceptformat=crx2,crx3&x=id%3D${a[2]}%26uc`
  21. }
  22. }
  23. (new MutationObserver(() => {
  24. clearTimeout(t);
  25. t = setTimeout(chk, 200)
  26. })).observe(document.body, {childList: true, subtree: true});
  27. document.documentElement.insertAdjacentHTML("beforeend", `\
  28. <style>
  29. div[role="dialog"][aria-labelledby="promo-header"],
  30. main>div:first-child>section:first-child>div[jscontroller][jsaction]:first-child {
  31. display: none;
  32. }
  33. </style>`);
  34. chk()
  35. })()