Advertisement
Th3-822

Fix 17b Downloads.user.js

Oct 8th, 2024 (edited)
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.40 KB | Source Code | 0 0
  1. // ==UserScript==
  2. // @name         Fix 17b Downloads
  3. // @namespace    //822/
  4. // @version      2024-10-08
  5. // @description  Tries to fix downloads for registered users. Note: Only Seems to work with Map/ or Wad/ downloads.
  6. // @author       Th3-822
  7. // @match        https://www.17buddies.rocks/*
  8. // @icon         https://www.google.com/s2/favicons?sz=64&domain=17buddies.rocks
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.     'use strict';
  14.  
  15.     // Your code here...
  16.     // function GoDown(sTyp, nId, nPrx, sCph, nLastest, bHlbox) {
  17.     var _GoDown = window.GoDown;
  18.     window.GoDown = function(sTyp, nId, nPrx, sCph, nLastest, bHlbox) {_GoDown(sTyp, nId, nPrx, sCph, nLastest, ((sTyp == "Map" || sTyp == "Wad") ? 1 : bHlbox))};
  19.  
  20.     // function HandleDownResponse(sResult) {
  21.     var _HandleDownResponse = window.HandleDownResponse;
  22.     window.HandleDownResponse = function(sResult) {
  23.         var data = sResult.split('|');
  24.         if (parseInt(data[0]) || data[1] || parseInt(data[3]) == 0) return _HandleDownResponse(sResult);
  25.  
  26.         if (window.oldChkDown != 0) {
  27.             window.getElementById('chkdwn_' + window.oldChkDown).style.display = 'none';
  28.             window.getElementById('chkdwn_' + window.oldChkDown).innerHTML = '';
  29.         }
  30.  
  31.         document.location = window.GlblUrl + 'Get/' + data[2] + '.zip';
  32.         window.HideMask();
  33.         window.HideLoading();
  34.     };
  35. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement