Skip to content

Commit

Permalink
增加一个安装方式
Browse files Browse the repository at this point in the history
  • Loading branch information
xiandanin committed Dec 14, 2018
1 parent 7ff80c3 commit 2a181fb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# GithubTags
给Github项目添加标签的Chrome插件,支持按标签搜索,数据支持云同步

## 安装
[从Chrome插件商店安装](https://chrome.google.com/webstore/detail/jfppflnlpiekbiglfgiajddmkiglapog)

[下载crx文件安装](https://github.com/dengyuhan/github-tags/releases)

## 截图
![](screenshot/1.gif)

#### 项目详情
Expand Down
14 changes: 10 additions & 4 deletions javascript/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var btn_save_id = "btn-save-appid";
var btn_edit_id = "btn-edit-appid";
var old_version_id = "div-old-version";

var current_version = "1.0.9"

window.onload = function () {
chrome.storage.sync.get("is_migrate", function (rsp) {
Expand Down Expand Up @@ -102,10 +103,15 @@ window.onload = function () {
if (ajax.readyState == 4 && ajax.status == 200) {
document.getElementById("update_container").removeAttribute("style")
var response = JSON.parse(ajax.responseText)
var version = document.getElementById("update_version")
version.setAttribute("href", response.link)
version.innerHTML = "v"+response.version
document.getElementById("update_message").innerHTML = response.message
console.log((current_version == response.version)+"--->"+current_version+"--->"+response.version);
if (current_version < response.version) {
var version = document.getElementById("update_version")
version.setAttribute("href", response.link)
version.innerHTML = "v" + response.version
document.getElementById("update_message").innerHTML = response.message
} else {
document.getElementById("update_container").style.display = "none"
}
console.log(ajax.responseText);
} else {
document.getElementById("update_container").style.display = "none"
Expand Down
2 changes: 1 addition & 1 deletion update.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"1.1.0","message":"增加了更新提示","link":"https://chrome.google.com/webstore/detail/githubtags/jfppflnlpiekbiglfgiajddmkiglapog"}
{"version":"1.0.9","message":"增加了更新提示","link":"https://chrome.google.com/webstore/detail/githubtags/jfppflnlpiekbiglfgiajddmkiglapog"}

0 comments on commit 2a181fb

Please sign in to comment.