Skip to content

Commit

Permalink
将http协议替换成https协议
Browse files Browse the repository at this point in the history
  • Loading branch information
luchenqun committed May 20, 2018
1 parent 872721d commit 444e6a2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bookmark-plugin
一个Google浏览器插件,配合[my-bookmart](http://mybookmark.cn)快速添加书签到系统。插件[下载地址](https://chrome.google.com/webstore/detail/%E4%B9%A6%E7%AD%BE%E5%BF%AB%E9%80%9F%E6%B7%BB%E5%8A%A0/paajmalhmjgdihaikmdfiplfmjlnkjgp)
一个Google浏览器插件,配合[my-bookmart](https://mybookmark.cn)快速添加书签到系统。插件[下载地址](https://chrome.google.com/webstore/detail/%E4%B9%A6%E7%AD%BE%E5%BF%AB%E9%80%9F%E6%B7%BB%E5%8A%A0/paajmalhmjgdihaikmdfiplfmjlnkjgp)

![image](http://mybookmark.cn/images/screenshot.gif)
![image](https://mybookmark.cn/images/screenshot.gif)
8 changes: 4 additions & 4 deletions js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function showMsg(body, title, time) {
}

function jqAjax(url, type, data, successCallback, errorCallback, beforeSendCallback, completeCallback) {
// console.log(url, type, data);
//console.log(url, type, data);
$.ajax({
url: url,
type: type, //GET POST
Expand All @@ -44,7 +44,7 @@ function jqAjax(url, type, data, successCallback, errorCallback, beforeSendCallb
}

function addBookmark(info, tab, tagId) {
let url = "http://mybookmark.cn/api/addBookmark/";
let url = "https://mybookmark.cn/api/addBookmark/";
let params = {
id: "",
url: info.pageUrl,
Expand All @@ -69,7 +69,7 @@ function addBookmark(info, tab, tagId) {
}

function addNote(info, tab, tagId) {
let url = "http://mybookmark.cn/api/addNote/";
let url = "https://mybookmark.cn/api/addNote/";
let params = {
tag_id: tagId,
content: info.selectionText,
Expand All @@ -90,7 +90,7 @@ function addNote(info, tab, tagId) {
}

function init() {
jqAjax("http://mybookmark.cn/api/tags/", "GET", {}, function (tags, textStatus, jqXHR) {
jqAjax("https://mybookmark.cn/api/tags/", "GET", {}, function (tags, textStatus, jqXHR) {
chrome.contextMenus.removeAll();
tags.sort((a, b) => {
return (a.last_use > b.last_use) ? -1 : 1;
Expand Down
14 changes: 7 additions & 7 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$("#js-title").val(tab.title);
$(".ui.inverted.dimmer").addClass("active");

let url = 'http://mybookmark.cn/api/tags/';
let url = 'https://mybookmark.cn/api/tags/';

bg.jqAjax(url, 'GET', {}, function (_tags, textStatus, jqXHR) {
login = true;
Expand All @@ -28,7 +28,7 @@
toastr.error('您必须先登陆!3秒后自动跳转到登陆页面。', "错误");
setTimeout(() => {
chrome.tabs.create({
url: 'http://mybookmark.cn/#/login'
url: 'https://mybookmark.cn/#/login'
});
}, 3000);
login = false;
Expand All @@ -44,7 +44,7 @@
toastr.info('请到网站分类页面添加分类,3秒后自动打开新的网页。', "提示");
setTimeout(() => {
chrome.tabs.create({
url: 'http://mybookmark.cn/#/tags'
url: 'https://mybookmark.cn/#/tags'
});
window.close();
}, 3000);
Expand All @@ -66,12 +66,12 @@
toastr.error('您必须先登陆!3秒后自动跳转到登陆页面。', "错误");
setTimeout(() => {
chrome.tabs.create({
url: 'http://mybookmark.cn/#/login'
url: 'https://mybookmark.cn/#/login'
});
}, 3000);
}

var url = "http://mybookmark.cn/api/addBookmark/";
var url = "https://mybookmark.cn/api/addBookmark/";
var params = {
id: "",
url: $("#js-url").val(),
Expand Down Expand Up @@ -115,7 +115,7 @@
toastr.error('您必须先登陆!3秒后自动跳转到登陆页面。', "错误");
setTimeout(() => {
chrome.tabs.create({
url: 'http://mybookmark.cn/#/login'
url: 'https://mybookmark.cn/#/login'
});
}, 3000);
}
Expand All @@ -125,7 +125,7 @@
return;
}

var url = "http://mybookmark.cn/api/addNote/";
var url = "https://mybookmark.cn/api/addNote/";
var params = {
tag_id: selectedTag,
content: $("#js-desc").val(),
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "书签快速添加",
"version": "1.0.3",
"description": "快速将书签添加到系统 http://mybookmark.cn/ 中",
"description": "快速将书签添加到系统 https://mybookmark.cn/ 中",
"icons": {
"16": "img/icon.png",
"48": "img/icon.png",
Expand Down Expand Up @@ -44,7 +44,7 @@
"web_accessible_resources": [
"js/inject.js"
],
"homepage_url": "http://mybookmark.cn/",
"homepage_url": "https://mybookmark.cn/",
"omnibox": {
"keyword": "bookmark"
}
Expand Down
2 changes: 1 addition & 1 deletion popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3 class="ui header">添加书签/备忘</h3>
<div class="fields">
<div class="required eight wide field">
<label>书签链接</label>
<input id="js-url" type="text" placeholder="输粘贴网页地址,如:http://mybookmark.cn/">
<input id="js-url" type="text" placeholder="输粘贴网页地址,如:https://mybookmark.cn/">
</div>
<div class="required eight wide field">
<label>书签标题</label>
Expand Down

0 comments on commit 444e6a2

Please sign in to comment.