Scripts


Styles


Plugins


Users


Forum


Developer
Username:
Password:
User Scripts
Title:

Facebook Secure Connection - Force Https (SSL)

Date Added:
2010-10-18 07:16:55 Installs: 825
Description: Forces Facebook and all links in a Facebook page (include Notifications) to use a secure connection (https).
Preview of Facebook Secure Connection - Force Https (SSL)
View script source of Facebook Secure Connection - Force Https (SSL)
Comment of Facebook Secure Connection - Force Https (SSL)
[2010-10-28 09:07:35]BBbacc says:
// ==UserScript==
// @name Facebook Secure Connection - Force Https (SSL)
// @namespace http://userscripts.org/scripts/show/86392
// @namespace http://www.maisdisdonc.com/
// @description Forces Facebook and all links in a Facebook page (include Notifications) to use a secure connection (https).
// @version 1.0.11
// @date 15:19 10/10/2010
// @author Merimac
// @include http*
// @include http*://*.facebook.com/*
// @license Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
// @license http://creativecommons.org/licenses/by-nc-sa/3.0/deed.fr
// ==/UserScript==

function $(q, root, single) {
if (root && typeof root == 'string') { root = $(root, null, true); }
root = root || document;
if (q[0]=='#') { return root.getElementById(q.substr(1)); }
else if (q[0]=='/' || (q[0]=='.' && q[1]=='/')) {
if (single) { return document.evaluate(q, root, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; }
return document.evaluate(q, root, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
}
else if (q[0]=='.') { return root.getElementsByClassName(q.substr(1)); }
return root.getElementsByTagName(q);
}

function fnEnableFacebookHttps() {
var url = window.location.href;
if(url.indexOf("http://www.facebook.com")==0 ||
url.indexOf("http://apps.facebook.com")==0) {
window.location.replace(location.href.replace(url.substring(0,7), "https://"));
}
}

function fnEnableHttpsLinks() {
var url = window.location.href;
if(url.indexOf("https://")==0) {
for(var i=0,link; (link=document.links[i]); i++) {
if(link.href.indexOf("http://")==0)
link.href = link.href.replace(link.href.substring(0,7), "https://");
}
}
}

function fnEnableHttpsFacebookLinks(){
var links = $("//a[contains(@href,'facebook.com')]");
//alert(links.snapshotItem(1).href);
for (var i=0; i<links.snapshotLength; i++) {
links.snapshotItem(i).href = links.snapshotItem(i).href.replace(/^http:\/\/([^\.]*\.)?facebook\.com\/l\.php\?u\=http\%([^\.]*\.)/,'https://$1facebook.com/l.php?u=https%$2');
links.snapshotItem(i).href = links.snapshotItem(i).href.replace(/^http:\/\/([^\.]*\.)?facebook\.com\//,'https://$1facebook.com/');
}
}


document.addEventListener(
'load',
function() {
fnEnableFacebookHttps(),
fnEnableHttpsFacebookLinks(),
setTimeout(function() { fnEnableHttpsFacebookLinks() }, 1000);
},
true
);


Join Iescripts for a free account, or Login if you are already a member.
Username: Password:

Written by
Name:testman84
Scripts:1
Styles:0
Plugins:0
Tags
https
 
  About IE7Pro
IE7Pro is a plugin for the Internet Explorer web browser. It allows you to change how your favorite pages behave and look. There are many scripts that have already been written, and if you know javascript you can easily create your own! This site is a repository to download and install IE user scripts.
  How to install user script

1 . First you should have install IE7Pro 0.9.12 and above which support IE user scripts.

2. Check if IE7Pro "Preference" - "User Scripts" - "EnabLe User Script" is enabled.

3. Find your favorite scripts on iescripts.org and click "Install This Script" .

 

iescripts.org  dewen.org