微软搞事(MSDN订户显示)

药丸

  1. // ==UserScript==
  2. // @name 微软搞事(MSDN订户显示)
  3. // @version 0.3
  4. // @description 药丸
  5. // @author InoriHimea
  6. // @require https://code.jquery.com/jquery-3.2.1.min.js
  7. // @match *://msdn.microsoft.com/*/subscriptions/downloads/*
  8. // @match *://msdn.microsoft.com/subscriptions/downloads/*
  9. // @match *://msdn.microsoft.com/*/subscriptions/securedownloads/*
  10. // @match *://msdn.microsoft.com/subscriptions/securedownloads/*
  11. // @grant unsafeWindow
  12. // @grant GM_setClipboard
  13. // @run-at document-end
  14. // @namespace https://gf.qytechs.cn/users/136944
  15. // ==/UserScript==
  16.  
  17. (function() {
  18. 'use strict';
  19.  
  20. $("#SubMigratedMessageArea").remove();
  21. window.setTimeout(function(){
  22. var length = $(".detailrow").length;
  23. if (length > 0) {
  24. $(".buttonscolumn").each(function(index){
  25. $(this).remove();
  26. });
  27. }
  28. },1500);
  29. window.setTimeout(function(){
  30. $("#DownloadsArea").fadeIn(1000,function(){
  31.  
  32. $(".newSubscriberDownloadProducts").click(function(){
  33. let href = $(this).find("a").attr("href");
  34. let value = href.substr(href.indexOf("#"),(href.length - href.indexOf("#")));
  35. window.location.href += value;
  36. window.location.reload();
  37. });
  38. var length = $(".detailrow").length;
  39. console.log("length:" + length);
  40. if (length > 0) {
  41. $(".detailrow").each(function(index){
  42. let id = $(this).find("div")[0].id;
  43. //console.log(id);
  44. let postId = id.substr(4,id.length);
  45. //console.log(postId);
  46.  
  47. let $detail = $("<label class=\"detailtitle\">文件名:</label><label id=\"filenameLabel\"></label><br/><label class=\"detailtitle\">语言:</label><label id=\"languagesLabel\"></label><br/><label class=\"detailtitle\">SHA1:</label><label id=\"sha1Label\"></label><br/><label class=\"detailtitle\">大小:</label><label id=\"sizeLabel\"></label>");
  48.  
  49. $("#" + id).append($detail);
  50. $("#" + id).css("display","block");
  51.  
  52. let postUrl = "https://msdn.microsoft.com/en-us/subscriptions/securejson/GetFileDetail";
  53. let postData = {"fileId":postId,"brand":"MSDN"};
  54. $.ajax({
  55. url : postUrl,
  56. type : "POST",
  57. data : postData,
  58. dataType : "json",
  59. success : function(json){
  60. $(".detailrow").eq(index).find("#filenameLabel").text(json.FileName);
  61. $(".detailrow").eq(index).find("#languagesLabel").text(json.Languages[0]);
  62. $(".detailrow").eq(index).find("#sha1Label").text(json.Sha1Hash);
  63. $(".detailrow").eq(index).find("#sizeLabel").text(json.Size);
  64. }
  65. });
  66. });
  67. }
  68. });
  69. },2000);
  70. })();

QingJ © 2025

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