阻止百度跳转HTTPS

阻止百度跳转HTTPS,强制跳转HTTP

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name 	 阻止百度跳转HTTPS
// @namespace    www.baidu.com
// @description  阻止百度跳转HTTPS,强制跳转HTTP
// @icon         https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1489045369706&di=ec6c17a9cfc7744569b87aa8436ebbcd&imgtype=0&src=http%3A%2F%2Fimgq.duitang.com%2Fuploads%2Fitem%2F201502%2F14%2F20150214151042_2JaYk.jpeg
// @version      1.1.4
// @include      http://www.baidu.com/*
// @include      https://www.baidu.com/*
// @match        https://www.baidu.com/*
// @author       edison2016
// @homepageURL	 https://greasyfork.org/zh-CN/scripts/27973
// @grant        none
// @encoding     utf-8
// @date         09/03/2017
// ==/UserScript==

function setsecucookie()
{
	document.cookie="secu=0; path=/";
    var targetProtocol = "http:";
    if (window.location.protocol != targetProtocol)
        window.location.href = targetProtocol +
        window.location.href.substring(window.location.protocol.length);
}
window.onload=setsecucookie;