Huawei AppGallery direct APK Download

Directly download APK files from Huawei AppGallery.

安装此脚本?
作者推荐脚本

您可能也喜欢Direct download from Google Play

安装此脚本
  1. // ==UserScript==
  2. // @name Huawei AppGallery direct APK Download
  3. // @name:it Download diretto degli APK da Huawei AppGallery
  4. // @namespace StephenP
  5. // @match https://appgallery.huawei.com/*
  6. // @grant none
  7. // @version 1.0
  8. // @author StephenP
  9. // @description Directly download APK files from Huawei AppGallery.
  10. // @description:it Scarica direttamente i files APK da Huawei AppGallery.
  11. // ==/UserScript==
  12. var lastUrl = "";
  13. const checkInterval = setInterval(function() {
  14. // Get the current URL
  15. const currentUrl = window.location.href;
  16.  
  17. // Check if the URL has changed
  18. if (currentUrl !== lastUrl) {
  19. console.log('URL changed:', currentUrl);
  20.  
  21. // Remove the element with ID "ddlButton" if it exists
  22. const ddlButton = document.getElementById('ddlButton');
  23. if (ddlButton) {
  24. ddlButton.remove();
  25. }
  26.  
  27. // Find the first element with class "right_install" and duplicate it [desktop interface]
  28. const rightInstallElements = document.getElementsByClassName('right_install');
  29. if (rightInstallElements.length > 0) {
  30. const firstElement = rightInstallElements[0];
  31. const clonedElement = firstElement.cloneNode(true);
  32. firstElement.parentNode.appendChild(clonedElement);
  33. clonedElement.firstChild.href=window.location.href.replace("appgallery.huawei.com/app/","appgallery.cloud.huawei.com/appdl/");
  34. clonedElement.firstChild.textContent="Download APK";
  35. clonedElement.firstChild.style.backgroundColor="#280";
  36. clonedElement.style.marginLeft="0.5em"
  37. clonedElement.id="ddlButton";
  38. // Update lastUrl to the current URL
  39. lastUrl = currentUrl;
  40. return
  41. }
  42. // Find the first element with class "right_install" and duplicate it [mobile interface]
  43. const mobileInstallElements = document.querySelectorAll('.mw_detailheadcard>.part_top>.right>.row3');
  44. if (mobileInstallElements.length > 0) {
  45. const firstElement = mobileInstallElements[0];
  46. const clonedElement = firstElement.cloneNode(true);
  47. firstElement.parentNode.appendChild(clonedElement);
  48. clonedElement.onclick=function(){window.open(window.location.href.replace("appgallery.huawei.com/app/","appgallery.cloud.huawei.com/appdl/"),"_self")};
  49. clonedElement.firstChild.textContent="Download APK";
  50. clonedElement.style.backgroundColor="#280";
  51. clonedElement.id="ddlButton";
  52. // Update lastUrl to the current URL
  53. lastUrl = currentUrl;
  54. return
  55. }
  56.  
  57. }
  58. }, 1000); // Check every 1 second

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址