diff --git a/src/background.js b/src/background.js index e75f641a..b346e0ce 100644 --- a/src/background.js +++ b/src/background.js @@ -171,12 +171,12 @@ browser.tabs.onUpdated.addListener( function( tabId, changeInfo, tab ) { browser.tabs.remove( tabId ); } }); - } else if ( tab.url.startsWith( "http://simpread.ksria.cn/plugins/install/" )) { - const url = tab.url.replace( "http://simpread.ksria.cn/plugins/install/", "" ); + } else if ( tab.url.startsWith( "https://simpread.ksria.cn/plugins/install/" )) { + const url = tab.url.replace( "https://simpread.ksria.cn/plugins/install/", "" ); browser.tabs.create({ url: browser.extension.getURL( "options/options.html#plugins?install=" + encodeURIComponent(url) ) }); browser.tabs.remove( tabId ); - } else if ( tab.url.startsWith( "http://simpread.ksria.cn/sites/install/" )) { - const url = tab.url.replace( "http://simpread.ksria.cn/sites/install/", "" ); + } else if ( tab.url.startsWith( "https://simpread.ksria.cn/sites/install/" )) { + const url = tab.url.replace( "https://simpread.ksria.cn/sites/install/", "" ); browser.tabs.create({ url: browser.extension.getURL( "options/options.html#sites?install=" + encodeURIComponent(url) ) }); browser.tabs.remove( tabId ); } else if ( tab.url == browser.runtime.getURL( "options/options.html#sites?update=success" ) ) { diff --git a/src/module/plugins.jsx b/src/module/plugins.jsx index e6571cfc..2f2bc31d 100644 --- a/src/module/plugins.jsx +++ b/src/module/plugins.jsx @@ -47,7 +47,7 @@ class Card extends React.Component { } addmore() { - browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "http://simpread.ksria.cn/plugins/details/" + this.props.plugin.id })); + browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "https://simpread.ksria.cn/plugins/details/" + this.props.plugin.id })); } render() { @@ -108,7 +108,7 @@ class Cards extends React.Component { return ( this.props.onChange(t)} /> ) - }) : 没有任何扩展,点击打开扩展中心添加。; + }) : 没有任何扩展,点击打开扩展中心添加。; return ( { card } ) @@ -172,7 +172,7 @@ export default class PluginsOpt extends React.Component { } addmore() { - browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "http://simpread.ksria.cn/plugins" })); + browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "https://simpread.ksria.cn/plugins" })); } update() { diff --git a/src/module/sites.jsx b/src/module/sites.jsx index e8bc0a8a..fa3bc16b 100644 --- a/src/module/sites.jsx +++ b/src/module/sites.jsx @@ -20,7 +20,7 @@ class Card extends React.Component { }; update() { - browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "http://simpread.ksria.cn/sites/details/" + this.props.info.domain + "?type=update" })); + browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "https://simpread.ksria.cn/sites/details/" + this.props.info.domain + "?type=update" })); } delete() { @@ -39,7 +39,7 @@ class Card extends React.Component { } addmore() { - browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "http://simpread.ksria.cn/sites/details/" + this.props.info.domain })); + browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "https://simpread.ksria.cn/sites/details/" + this.props.info.domain })); } render() { @@ -94,7 +94,7 @@ class Cards extends React.Component { return ( this.onChange(t)} /> ) - }) : 没有任何站点,点击打开「站点集市」添加。; + }) : 没有任何站点,点击打开「站点集市」添加。; return ( { card } ) @@ -184,7 +184,7 @@ export default class SitesOpts extends React.Component { } addmore() { - browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "http://simpread.ksria.cn/sites" })); + browser.runtime.sendMessage( msg.Add( msg.MESSAGE_ACTION.new_tab, { url: "https://simpread.ksria.cn/sites" })); } install() { diff --git a/src/service/runtime.js b/src/service/runtime.js index 96f3d308..4e5af33c 100644 --- a/src/service/runtime.js +++ b/src/service/runtime.js @@ -32,7 +32,7 @@ function generateID( type ) { * @param {string} url */ function install( id, url, callback ) { - url = id ? `http://simpread.ksria.cn/plugins/srplug/${id}.srplug` : url; + url = id ? `https://simpread.ksria.cn/plugins/srplug/${id}.srplug` : url; url = url + `?${+new Date()}`; console.log( "install url is", url ) $.ajax({ url, dataType: "json" }) diff --git a/src/service/storage.js b/src/service/storage.js index c779861c..9204beaa 100644 --- a/src/service/storage.js +++ b/src/service/storage.js @@ -372,7 +372,7 @@ class Storage { */ get service() { //return "http://localhost:3000"; - return "http://simpread.ksria.cn"; + return "https://simpread.ksria.cn"; } /**