Redeem Microsoft Store Freebie

微软商店购买免费品

  1. // ==UserScript==
  2. // @name Redeem Microsoft Store Freebie
  3. // @namespace https://gf.qytechs.cn/users/34380
  4. // @version 20101011
  5. // @description 微软商店购买免费品
  6. // @match https://www.microsoft.com/*/p/*
  7. // @run-at document-idle
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. 'use strict';
  13.  
  14. // Your code here...
  15. const $des = document.querySelector('.caption.text-muted');
  16. if ($des && $des.innerText.match(/100%/)) {
  17. const mClick = new MouseEvent("click", {
  18. bubbles: true,
  19. cancelable: true,
  20. view: window
  21. });
  22. document.querySelector('#buttonPanel_AppIdentityBuyButton').dispatchEvent(mClick);
  23. setInterval(() => {
  24. if (document.querySelector('.pi-pti')) {
  25. window.close();
  26. }
  27. }, 5000);
  28. }
  29. })();

QingJ © 2025

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