Nexusmods Allow archive downloads

Adds downloads buttons to the mod archive page if they're disabled

  1. // ==UserScript==
  2. // @name Nexusmods Allow archive downloads
  3. // @namespace https://gf.qytechs.cn/ru/users/303426-титан
  4. // @version 1.0.1
  5. // @description Adds downloads buttons to the mod archive page if they're disabled
  6. // @author Титан
  7. // @match https://www.nexusmods.com/*/mods/*?tab=files&category=archived
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=nexusmods.com
  9. // @grant none
  10. // @require https://gf.qytechs.cn/scripts/21927-arrive-js/code/arrivejs.js?version=198809
  11. // @license CC BY-NC-SA
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. let options = {
  18. fireOnAttributesModification: false,
  19. onceOnly: true,
  20. existing: true
  21. }
  22. document.arrive(".accordionitems", options, function(fileList) {
  23. let gameId, dataId;
  24. //let endorsmentLink = document.querySelector("a[title=\"See who endorsed this mod\"]").href;
  25. gameId = window.current_game_id;
  26. console.log(gameId);
  27. for(let data of fileList.querySelectorAll("dt")) {
  28. dataId = data.getAttribute("data-id");
  29. data.nextElementSibling.appendChild(CreateDownloadBttons(dataId, gameId));
  30. }
  31. });
  32.  
  33. function CreateDownloadBttons(dataId, gameId) {
  34. let donwloadButtons = `
  35. <ul class="accordion-downloads clearfix">
  36. <li>
  37. <a class="btn inline-flex popup-btn-ajax" href="/Core/Libs/Common/Widgets/ModRequirementsPopUp?id=${dataId}&amp;game_id=${gameId}&amp;nmm=1">
  38. <svg title="" class="icon icon-nmm">
  39. <use xlink:href="https://www.nexusmods.com/assets/images/icons/icons.svg#icon-nmm"></use>
  40. </svg> <span class="flex-label">Mod manager download</span> </a>
  41. </li>
  42. <li> </li>
  43. <li>
  44. <a class="btn inline-flex popup-btn-ajax" href="/Core/Libs/Common/Widgets/ModRequirementsPopUp?id=${dataId}&amp;game_id=${gameId}">
  45. <svg title="" class="icon icon-manual">
  46. <use xlink:href="https://www.nexusmods.com/assets/images/icons/icons.svg#icon-manual"></use>
  47. </svg> <span class="flex-label">Manual download</span> </a>
  48. </li>
  49. </ul>
  50. `
  51. let downloadButtonsElement = document.createElement("div");
  52. downloadButtonsElement.innerHTML = donwloadButtons;
  53. downloadButtonsElement.classList.add("allow-archive-downloads-wrapper","tabbed-block")
  54. return downloadButtonsElement;
  55. }
  56. })();

QingJ © 2025

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