From d45710010f8112f874f8ffc524305be6dd2e91c6 Mon Sep 17 00:00:00 2001 From: Kenshin Date: Fri, 13 Apr 2018 11:00:08 +0800 Subject: [PATCH] Fix https sync websites bug. --- src/simpread.user.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/simpread.user.js b/src/simpread.user.js index 5c0b7ac..fa14033 100644 --- a/src/simpread.user.js +++ b/src/simpread.user.js @@ -665,6 +665,10 @@ function optionMode() { $a.remove(); }, remote = event => { + if ( location.protocol == "https:" ) { + new Notify().Render( `请勿在 https 下面使用此功能,请前往 http 的页面,如: 点击这里` ); + return; + } $.getJSON( "http://ojec5ddd5.bkt.clouddn.com/website_list_v3.json" + "?_=" + Math.round(+new Date()), result => { const count = pr.Addsites( result ); count == 0 ? new Notify().Render( "适配列表已同步至最新版本。" ) : new Notify().Render( 0, `适配列表已同步成功,本次新增 ${ count } 个站点。` );