FileFactory HTTPS Fix

Forces all member area top-menu links to HTTPS.

2016-01-11 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        FileFactory HTTPS Fix
// @namespace   [email protected]
// @description Forces all member area top-menu links to HTTPS.
// @include     http://www.filefactory.com/*
// @include     http://filefactory.com/*
// @include     https://filefactory.com/*
// @include     https://www.filefactory.com/*
// @version     1.2
// @license     GNU General Public License version 3 or any later version; https://www.gnu.org/licenses/gpl-3.0.htm
// @grant       none

// ==/UserScript==
var url = window.location.href;
url = url.split("www")[1];
url = "https://www" + url;
$("a[href='/search/']").attr('href', 'https://www.filefactory.com/search/');
$("a[href='/account/']").attr('href', 'https://www.filefactory.com/account/');
$("a[href='/myfiles/']").attr('href', 'https://www.filefactory.com/myfiles/');
$("a[href='/upload/']").attr('href', 'https://www.filefactory.com/upload/');
$("a[href='/upload/remote.php']").attr('href', 'https://www.filefactory.com/upload/remote.php');
$("a[href='/upload/ftp.php']").attr('href', 'https://www.filefactory.com/upload/ftp.php');
$("a[href='/account/support/diagnostics.php']").attr('href', 'https://www.filefactory.com/account/support/diagnostics.php');
$("a[href='/services/premium/']").attr('href', 'https://www.filefactory.com/services/premium/');
$("a[href='/services/fileplanet/']").attr('href', 'https://www.filefactory.com/search/');
$("a[href='#']").attr('href', url);
//fix search results - will  make links to download pages https... not files because FF doesn't support this
$("#search_files a").each(function() {
  var http = $(this).attr("href"); 
  var https = http.replace("http://","https://");
  $(this).attr('href',https);
})