Redirect New Unity Asset Store Links to Old Unity Asset Store

This new Unity Asset Store is annoying...

  1. // ==UserScript==
  2. // @name Redirect New Unity Asset Store Links to Old Unity Asset Store
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.4
  5. // @description This new Unity Asset Store is annoying...
  6. // @author You
  7. // @include https://www.assetstore.unity*
  8. // @include https://assetstore.unity*
  9. // @grant none
  10. // @run-at document-start
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. //"packages" is used by the new Asset Store, where it is "content" on the old Asset Store.
  17. if(document.URL.includes("packages")) {
  18. window.location.href = "https://www.assetstore.unity3d.com/en/?stay#!/content/" + document.URL.substr(document.URL.lastIndexOf("-") + 1, document.URL.length);
  19. } else if(document.URL == "https://assetstore.unity.com/") {
  20. window.location.href = "https://www.assetstore.unity3d.com/en/?stay";
  21. }
  22. })();