diff --git a/README.md b/README.md index 462c7eb..0cb28d9 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ 6. 建议插件安装成功后,关闭开发者模式。 -7. 现在就可以正常使用了,假如需要同步功能,先[获取GitHub和Gitee的token](#获取token方法),在“其他功能”-“查看配置”里对应的地方填写token,然后在“gist功能”-“是否自动同步”选是; +7. 现在就可以正常使用了,假如需要同步功能,先[获取GitHub和Gitee的token](#获取token方法),在“其他功能”-“查看配置”里对应的地方填写token,然后在“同步功能”-“是否自动同步”选是; 8. 2个同步平台,可以同时配置,也可以只配置1个,不冲突,假如选了自动同步,会自动无感知的**定时**同步到2个平台里,注意:Gitee特别设置了只要有修改就无感知自动同步,也就是说只要有修改,删除,移动等动作,就自动实时同步到Gitee,选Gitee更保险,真.理论上永不丢失数据。 @@ -150,12 +150,12 @@ 12. 手动push或pull到GitHub或者Gitee的gist - 进入后台管理页,最上面的**GitHub API 状态** 显示当前跟GitHub通讯是否正常,**Gitee API 状态** 显示当前跟Gitee通讯是否正常,点击**gist功能**,有五个选项,**推送到GitHub的gist里**,**从GitHub的gist里拉取**,**推送到Gitee的gist里**,**从Gitee的gist里拉取**,按字面意思选择功能,这里面会有个token的强制要求,这个token用于授权,[获取GitHub和Gitee的token](#获取token方法) + 进入后台管理页,最上面的**GitHub API 状态** 显示当前跟GitHub通讯是否正常,**Gitee API 状态** 显示当前跟Gitee通讯是否正常,点击**同步功能**,有五个选项,**推送到GitHub的gist里**,**从GitHub的gist里拉取**,**推送到Gitee的gist里**,**从Gitee的gist里拉取**,按字面意思选择功能,这里面会有个token的强制要求,这个token用于授权,[获取GitHub和Gitee的token](#获取token方法) 13. 自动定时同步功能 - 点击**gist功能**,勾选了自动同步后 + 点击**同步功能**,勾选了自动同步后 - 会定时自动同步到GitHub(每隔90分钟)和Gitee(每隔70分钟),目前是写死的时间间隔,同步操作记录会写在日志里(就算选了不自动同步也会有日志) - 2个同步平台,可以同时配置,也可以只配置1个,不冲突 - 注意:Gitee特别设置了只要有修改就无感知自动实时同步,也就是说只要有修改,删除,移动等动作,就自动实时同步到Gitee,选Gitee更保险,真.理论上永不丢失数据。 diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 2d8d77a..ac043ef 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -75,40 +75,40 @@ "message": " TABS" }, "totals": { - "message": " records" + "message": " Records" }, "home": { "message": "Home" }, "hideShowImportOnetabFunction": { - "message": "import OneTab mode" + "message": "Import OneTab Mode" }, "hideShowImportDefaultFunction": { - "message": "import default mode" + "message": "Import Default Mode" }, "hideShowExportFunction": { - "message": "export" + "message": "Export" }, "dragTitle": { - "message": "super drag title" + "message": "Super Drag Title" }, "dragTabs": { - "message": "super drag tabs" + "message": "Super Drag Tabs" }, "dragOpenTranslate": { - "message": "cross word translation" + "message": "Cross Word Translation" }, "pushToGithubGist": { - "message": "push to github's gist" + "message": "Push To GitHub's gist" }, "pullFromGithubGist": { - "message": "pull from github's gist" + "message": "Pull From GitHub's gist" }, "pushToGiteeGist": { - "message": "push to gitee's gist" + "message": "Push To Gitee's gist" }, "pullFromGiteeGist": { - "message": "pull from gitee's gist" + "message": "Pull From Gitee's gist" }, "confirmKey": { "message": "Please input \"confirm\" to ensure: " @@ -132,25 +132,25 @@ "message": "pack up" }, "gistFunction": { - "message": "gist function" + "message": "Sync" }, "otherFunction": { - "message": "other function" + "message": "Other" }, "githubApiStatusSuccess": { - "message": "Github API status : SUCCESS" + "message": "GitHub API status : SUCCESS" }, "giteeApiStatusSuccess": { "message": "Gitee API status : SUCCESS" }, "githubApiStatusFailed": { - "message": "Github API status : FAILED" + "message": "GitHub API status : FAILED" }, "giteeApiStatusFailed": { "message": "Gitee API status : FAILED" }, "githubApiStatusError": { - "message": "Github API status : ERROR" + "message": "GitHub API status : ERROR" }, "giteeApiStatusError": { "message": "Gitee API status : ERROR" @@ -162,10 +162,10 @@ "message": "no" }, "pushToGithubGistIng": { - "message": "push to Github's Gist ing, please wait!" + "message": "push to GitHub's Gist ing, please wait!" }, "pullFromGithubGistIng": { - "message": "pull from Github's Gist ing, please wait!" + "message": "pull from GitHub's Gist ing, please wait!" }, "pushToGiteeGistIng": { "message": "push to Gitee's Gist ing, please wait!" @@ -174,64 +174,64 @@ "message": "pull from Gitee's Gist ing, please wait!" }, "startPushToGithubGistTask": { - "message": "start push to github's gist task" + "message": "start push to GitHub's gist task" }, "startPullFromGithubGistTask": { - "message": "start pull from github's gist task" + "message": "start pull from GitHub's gist task" }, "startPushToGiteeGistTask": { - "message": "start push to gitee's gist task" + "message": "start push to Gitee's gist task" }, "startPullFromGiteeGistTask": { - "message": "start pull from gitee's gist task" + "message": "start pull from Gitee's gist task" }, "endPushToGithubGistTask": { - "message": "push to github's gist task end" + "message": "push to GitHub's gist task end" }, "endPullFromGithubGistTask": { - "message": "pull from github's gist task end" + "message": "pull from GitHub's gist task end" }, "endPushToGiteeGistTask": { - "message": "push to gitee's gist task end" + "message": "push to Gitee's gist task end" }, "endPullFromGiteeGistTask": { - "message": "pull from gitee's gist task end" + "message": "pull from Gitee's gist task end" }, "clickPushToGithubGist": { - "message": "click push to github's gist" + "message": "click push to GitHub's gist" }, "autoPushToGithubGist": { - "message": "auto push to github's gist" + "message": "auto push to GitHub's gist" }, "clickPullFromGithubGist": { - "message": "click pull from github's gist" + "message": "click pull from GitHub's gist" }, "clickPushToGiteeGist": { - "message": "click push to gitee's gist" + "message": "click push to Gitee's gist" }, "autoPushToGiteeGist": { - "message": "auto push to gitee's gist" + "message": "auto push to Gitee's gist" }, "clickPullFromGiteeGist": { - "message": "click pull from gitee's gist" + "message": "click pull from Gitee's gist" }, "startCheckGithubTokenSaved": { - "message": "start check github token is saved ?" + "message": "start check GitHub token is saved ?" }, "startCheckGiteeTokenSaved": { - "message": "start check gitee token is saved ?" + "message": "start check Gitee token is saved ?" }, "githubTokenSaved": { - "message": "github token had saved" + "message": "GitHub token had saved" }, "giteeTokenSaved": { - "message": "gitee token had saved" + "message": "Gitee token had saved" }, "githubTokenNoSaved": { - "message": "github token had not saved" + "message": "GitHub token had not saved" }, "giteeTokenNoSaved": { - "message": "gitee token had not saved" + "message": "Gitee token had not saved" }, "saveTokenKey": { "message": "please input token:" @@ -240,10 +240,10 @@ "message": "Warn!!! please ensure your token is right!!!" }, "githubTokenSaveSuccess": { - "message": "github token save success!" + "message": "GitHub token save success!" }, "giteeTokenSaveSuccess": { - "message": "gitee token save success!" + "message": "Gitee token save success!" }, "startCheckGistIdSaved": { "message": "start check gistId is saved ?" @@ -279,10 +279,10 @@ "message": "had not created gist, nothing can pull, it's over!" }, "startCreateGithubGist": { - "message": "had not created gist, start create github gist now!" + "message": "had not created gist, start create GitHub gist now!" }, "startCreateGiteeGist": { - "message": "had not created gist, start create gitee gist now!" + "message": "had not created gist, start create Gitee gist now!" }, "createSuccess": { "message": " create success" @@ -291,13 +291,13 @@ "message": "create failed" }, "getGithubGistById": { - "message": "get github's gist by gistId" + "message": "get GitHub's gist by gistId" }, "getGithubGistByRawUrl": { - "message": "be truncated, get github's gist by raw_url" + "message": "be truncated, get GitHub's gist by raw_url" }, "getGiteeGistById": { - "message": "get gitee's gist by gistId" + "message": "get Gitee's gist by gistId" }, "pullSuccess": { "message": "pull gist success" @@ -312,22 +312,22 @@ "message": "end: " }, "clickPushGithub": { - "message": "CLICK TO PUSH TO GITHUB'S GIST" + "message": "CLICK TO PUSH TO GitHub'S GIST" }, "autoPushGithub": { - "message": "AUTO PUSH TO GITHUB'S GIST" + "message": "AUTO PUSH TO GitHub'S GIST" }, "clickPullGithub": { - "message": "CLICK TO PULL FROM GITHUB'S GIST" + "message": "CLICK TO PULL FROM GitHub'S GIST" }, "clickPushGitee": { - "message": "CLICK TO PUSH TO GITEE'S GIST" + "message": "CLICK TO PUSH TO Gitee'S GIST" }, "autoPushGitee": { - "message": "AUTO PUSH TO GITEE'S GIST" + "message": "AUTO PUSH TO Gitee'S GIST" }, "clickPullGitee": { - "message": "CLICK TO PULL FROM GITEE'S GIST" + "message": "CLICK TO PULL FROM Gitee'S GIST" }, "waitForMinutes": { "message": "minute wait for" @@ -360,10 +360,10 @@ "message": "The source code for CloudSkyMonster is available at " }, "usedSpace": { - "message": "usedSpace : " + "message": "UsedSpace : " }, "autoSync": { - "message": "open sync" + "message": "Open Sync" }, "noLog": { "message": "No log have been saved yet" @@ -372,7 +372,7 @@ "message": "No tab groups have been saved yet, or you deleted them all..." }, "showLog": { - "message": "show log" + "message": "Logs" }, "secondWait": { "message": " second wait" diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 602df82..c8f0344 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -99,16 +99,16 @@ "message": "是否划词翻译" }, "pushToGithubGist": { - "message": "推送到github的gist" + "message": "推送到GitHub的gist" }, "pullFromGithubGist": { - "message": "从github的gist拉取" + "message": "从GitHub的gist拉取" }, "pushToGiteeGist": { - "message": "推送到gitee的gist" + "message": "推送到Gitee的gist" }, "pullFromGiteeGist": { - "message": "从gitee的gist拉取" + "message": "从Gitee的gist拉取" }, "confirmKey": { "message": "请输入\"确定\"表示确认:" @@ -132,25 +132,25 @@ "message": "收起" }, "gistFunction": { - "message": "gist功能" + "message": "同步功能" }, "otherFunction": { "message": "其他功能" }, "githubApiStatusSuccess": { - "message": "Github API 状态 : 正常" + "message": "GitHub API 状态 : 正常" }, "giteeApiStatusSuccess": { "message": "Gitee API 状态 : 正常" }, "githubApiStatusFailed": { - "message": "Github API 状态 : 异常" + "message": "GitHub API 状态 : 异常" }, "giteeApiStatusFailed": { "message": "Gitee API 状态 : 异常" }, "githubApiStatusError": { - "message": "Github API 状态 : 报错" + "message": "GitHub API 状态 : 报错" }, "giteeApiStatusError": { "message": "Gitee API 状态 : 报错" @@ -162,76 +162,76 @@ "message": "否" }, "pushToGithubGistIng": { - "message": "正在推送到github的gist,请稍等!" + "message": "正在推送到GitHub的gist,请稍等!" }, "pullFromGithubGistIng": { - "message": "正在从github的gist拉取,请稍等!" + "message": "正在从GitHub的gist拉取,请稍等!" }, "pushToGiteeGistIng": { - "message": "正在推送到gitee的gist,请稍等!" + "message": "正在推送到Gitee的gist,请稍等!" }, "pullFromGiteeGistIng": { - "message": "正在从gitee的gist拉取,请稍等!" + "message": "正在从Gitee的gist拉取,请稍等!" }, "startPushToGithubGistTask": { - "message": "开始推送到github的gist的任务" + "message": "开始推送到GitHub的gist的任务" }, "startPullFromGithubGistTask": { - "message": "开始从github的gist拉取的任务" + "message": "开始从GitHub的gist拉取的任务" }, "startPushToGiteeGistTask": { - "message": "开始推送到gitee的gist的任务" + "message": "开始推送到Gitee的gist的任务" }, "startPullFromGiteeGistTask": { - "message": "开始从gitee的gist拉取的任务" + "message": "开始从Gitee的gist拉取的任务" }, "endPushToGithubGistTask": { - "message": "推送到github的gist的任务结束" + "message": "推送到GitHub的gist的任务结束" }, "endPullFromGithubGistTask": { - "message": "从github的gist拉取的任务完成" + "message": "从GitHub的gist拉取的任务完成" }, "endPushToGiteeGistTask": { - "message": "推送到gitee的gist的任务结束" + "message": "推送到Gitee的gist的任务结束" }, "endPullFromGiteeGistTask": { - "message": "从gitee的gist拉取的任务完成" + "message": "从Gitee的gist拉取的任务完成" }, "clickPushToGithubGist": { - "message": "手动点击推送到github的gist" + "message": "手动点击推送到GitHub的gist" }, "autoPushToGithubGist": { - "message": "自动推送到github的gist" + "message": "自动推送到GitHub的gist" }, "clickPullFromGithubGist": { - "message": "手动点击从github的gist拉取" + "message": "手动点击从GitHub的gist拉取" }, "clickPushToGiteeGist": { - "message": "手动点击推送到gitee的gist" + "message": "手动点击推送到Gitee的gist" }, "autoPushToGiteeGist": { - "message": "自动推送到gitee的gist" + "message": "自动推送到Gitee的gist" }, "clickPullFromGiteeGist": { - "message": "手动点击从gitee的gist拉取" + "message": "手动点击从Gitee的gist拉取" }, "startCheckGithubTokenSaved": { - "message": "开始检查github token有没有保存" + "message": "开始检查GitHub token有没有保存" }, "startCheckGiteeTokenSaved": { - "message": "开始检查gitee token有没有保存" + "message": "开始检查Gitee token有没有保存" }, "githubTokenSaved": { - "message": "github token有保存" + "message": "GitHub token有保存" }, "giteeTokenSaved": { - "message": "gitee token有保存" + "message": "Gitee token有保存" }, "githubTokenNoSaved": { - "message": "github token没有保存" + "message": "GitHub token没有保存" }, "giteeTokenNoSaved": { - "message": "gitee token没有保存" + "message": "Gitee token没有保存" }, "saveTokenKey": { "message": "请输入token:" @@ -240,10 +240,10 @@ "message": "请确保token是正确的!!!" }, "githubTokenSaveSuccess": { - "message": "github token 保存完毕" + "message": "GitHub token 保存完毕" }, "giteeTokenSaveSuccess": { - "message": "gitee token 保存完毕" + "message": "Gitee token 保存完毕" }, "startCheckGistIdSaved": { "message": "开始检查gistId有没有保存" @@ -279,10 +279,10 @@ "message": "还没有创建gist,没有内容可以拉,结束任务" }, "startCreateGithubGist": { - "message": "还没有创建github的gist,开始创建" + "message": "还没有创建GitHub的gist,开始创建" }, "startCreateGiteeGist": { - "message": "还没有创建gitee的gist,开始创建" + "message": "还没有创建Gitee的gist,开始创建" }, "createSuccess": { "message": "创建成功" @@ -291,13 +291,13 @@ "message": "创建失败" }, "getGithubGistById": { - "message": "根据github的gistId拉取gist" + "message": "根据GitHub的gistId拉取gist" }, "getGithubGistByRawUrl": { "message": "被截断了,根据raw_url拉取gist" }, "getGiteeGistById": { - "message": "根据gitee的gistId拉取gist" + "message": "根据Gitee的gistId拉取gist" }, "pullSuccess": { "message": "拉取gist成功" @@ -312,22 +312,22 @@ "message": "结束:" }, "clickPushGithub": { - "message": "手动推送到github" + "message": "手动推送到GitHub" }, "autoPushGithub": { - "message": "自动推送到github" + "message": "自动推送到GitHub" }, "clickPullGithub": { - "message": "手动从github拉取" + "message": "手动从GitHub拉取" }, "clickPushGitee": { - "message": "手动推送到gitee" + "message": "手动推送到Gitee" }, "autoPushGitee": { - "message": "自动推送到gitee" + "message": "自动推送到Gitee" }, "clickPullGitee": { - "message": "手动从gitee拉取" + "message": "手动从Gitee拉取" }, "waitForMinutes": { "message": " 秒等待" diff --git a/js/workbench.js b/js/workbench.js index ef5da83..127bdde 100644 --- a/js/workbench.js +++ b/js/workbench.js @@ -97,12 +97,6 @@
  • -
  • - -
  • -
  • - -
  • @@ -172,10 +166,7 @@ https://www.google.com | Google $("#navbar ul li").click(function () { $(this).addClass("active").siblings().removeClass("active"); }) - // 检查跟github的通讯是否正常 - checkGitHubStatus(); - // 检查跟gitee的通讯是否正常 - checkGiteeStatus(); + chrome.storage.local.get(null, function (items) { // 一load完就算一下storage占用了多少空间 chrome.storage.local.getBytesInUse(null, function (bytes) {