m-team https fix

Convert in-site http links to https

2016/02/28のページです。最新版はこちら

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        m-team https fix
// @namespace   m-team
// @version     0.02
// @grant       none
// @include     https://tp.m-team.cc/*
// @description Convert in-site http links to https
// @description:zh-CN 将站内 http 链接转换为 https
// @description:zh-TW 將站內 http 鏈接轉換為 https
// ==/UserScript==

(function(){
	var snapResults = document.evaluate("//a[contains(@href,'http://tp.m-team.cc/')]", 
		document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
		console.log(snapResults.snapshotLength, '----');
	for (var i = snapResults.snapshotLength - 1; i >= 0; i--) {
		var elm = snapResults.snapshotItem(i);
		console.log(elm.getAttribute('href'),elm.getAttribute('href').replace(/^http:\/\/(tp\.m-team\.cc\/)/i, "https://$1"));
		elm.setAttribute('href', elm.getAttribute('href').replace(/^http:\/\/(tp\.m-team\.cc\/)/i, "https://$1"));
	}
})()