Redirect alipan.com to aliyundrive.com

Redirect alipan.com to aliyundrive.com on any webpage

  1. // ==UserScript==
  2. // @name Redirect alipan.com to aliyundrive.com
  3. // @namespace https://findhao.net
  4. // @version 0.2
  5. // @description Redirect alipan.com to aliyundrive.com on any webpage
  6. // @author Your Name
  7. // @match *://alipan.com/*
  8. // @match *://www.alipan.com/*
  9. // @copyright 2024+, Find
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. // Check if the current URL contains "alipan.com" or "www.alipan.com"
  18. if (window.location.hostname === 'alipan.com' || window.location.hostname === 'www.alipan.com') {
  19. // Redirect to the corresponding aliyundrive.com URL
  20. window.location.hostname = 'aliyundrive.com';
  21. }
  22. })();