MediaFire Error Redirect

Redirects specific MediaFire error pages to a new URL with the extracted quickkey.

目前为 2024-12-19 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name MediaFire Error Redirect
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Redirects specific MediaFire error pages to a new URL with the extracted quickkey.
  6. // @author You
  7. // @match https://www.mediafire.com/error.php?errno=323&quickkey=*&origin=download
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. // Get the current URL
  16. const currentUrl = window.location.href;
  17.  
  18. // Ensure the URL matches the pattern
  19. const match = currentUrl.match(/quickkey=([^&]+)&origin=/);
  20. if (match) {
  21. const quickKey = match[1]; // Extract the quickkey
  22.  
  23. // Construct the new URL
  24. const newUrl = `https://www.mediafire.com/?iqomgyms12u74oz,${quickKey}`;
  25.  
  26. // Redirect to the new URL
  27. window.location.href = newUrl;
  28. }
  29. })();