Guest User

Patch for Apple Trailer Download HD+

a guest
Jun 3rd, 2013
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.60 KB | None | 0 0
  1. @@ -9,6 +9,9 @@
  2.  // @require         http://userscripts.org/scripts/source/87345.user.js
  3.  // @require         http://userscripts.org/scripts/source/98574.user.js
  4.  // @noframes
  5. +// @grant           GM_addStyle
  6. +// @grant           GM_xmlhttpRequest
  7. +// @grant           GM_registerMenuCommand
  8.  // ==/UserScript==
  9.  
  10.  
  11. @@ -52,14 +55,17 @@
  12.          // let's scan for links (async)
  13.          intervID = setTimeout(function() {
  14.              GM_xmlhttpRequest({
  15. -                "url" : "includes/large.html",
  16. +                "method" : "GET",
  17. +                "synchronous" : false,
  18. +                "url" : window.location.href + "includes/large.html",
  19.                  "onload" : function(xhr)
  20.                  {
  21.                      // analyse the contents
  22.                      getTrailerPages(xhr.responseText);
  23.                  },
  24.                  "onerror":function() {
  25. -                    showError("Ajax error");
  26. +
  27. +                    showError("Could not GET includes/large asynchronously.");
  28.                  }
  29.              });
  30.          }, 250);
  31. @@ -70,7 +76,8 @@
  32.     */
  33.      function getDownloadlinks(order, url, title, cb) {
  34.          GM_xmlhttpRequest({
  35. -            "url" : url,
  36. +            "method" : "GET",
  37. +            "url" : window.location.href + url,
  38.              "onload" : function(xhr)
  39.              {
  40.                  // analyse the contents
  41. @@ -79,6 +86,7 @@
  42.              },
  43.              "onerror" : function() {
  44.                  if (cb) cb();
  45. +                showError("Could not GET trailer subpage asynchronously.");
  46.              }
  47.          });
  48.      }
Add Comment
Please, Sign In to add comment