FileFactory HTTPS Fix

Forces all member area top-menu links to HTTPS.

  1. // ==UserScript==
  2. // @name FileFactory HTTPS Fix
  3. // @namespace jeremy@use.startmail.com
  4. // @description Forces all member area top-menu links to HTTPS.
  5. // @include http://www.filefactory.com/*
  6. // @include http://filefactory.com/*
  7. // @include https://filefactory.com/*
  8. // @include https://www.filefactory.com/*
  9. // @version 1.2
  10. // @license GNU General Public License version 3 or any later version; https://www.gnu.org/licenses/gpl-3.0.htm
  11. // @grant none
  12.  
  13. // ==/UserScript==
  14. var url = window.location.href;
  15. url = url.split("www")[1];
  16. url = "https://www" + url;
  17. $("a[href='/search/']").attr('href', 'https://www.filefactory.com/search/');
  18. $("a[href='/account/']").attr('href', 'https://www.filefactory.com/account/');
  19. $("a[href='/myfiles/']").attr('href', 'https://www.filefactory.com/myfiles/');
  20. $("a[href='/upload/']").attr('href', 'https://www.filefactory.com/upload/');
  21. $("a[href='/upload/remote.php']").attr('href', 'https://www.filefactory.com/upload/remote.php');
  22. $("a[href='/upload/ftp.php']").attr('href', 'https://www.filefactory.com/upload/ftp.php');
  23. $("a[href='/account/support/diagnostics.php']").attr('href', 'https://www.filefactory.com/account/support/diagnostics.php');
  24. $("a[href='/services/premium/']").attr('href', 'https://www.filefactory.com/services/premium/');
  25. $("a[href='/services/fileplanet/']").attr('href', 'https://www.filefactory.com/search/');
  26. $("a[href='#']").attr('href', url);
  27. //fix search results - will make links to download pages https... not files because FF doesn't support this
  28. $("#search_files a").each(function() {
  29. var http = $(this).attr("href");
  30. var https = http.replace("http://","https://");
  31. $(this).attr('href',https);
  32. })