From 14f6b17e81768ccc5706e218ee699415a54dc7fc Mon Sep 17 00:00:00 2001 From: Fayland Lam Date: Mon, 9 Jun 2014 07:50:25 +0800 Subject: [PATCH] mei.tmall --- README.md | 2 +- js/qiandao/tmall.js | 8 +++++--- manifest.json | 2 +- src/browser_action/browser_action.html | 4 ++++ src/browser_action/browser_action.js | 3 ++- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d13c8ea..9caeefd 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ Chrome 插件 自动签到 [https://chrome.google.com/webstore/detail/%E8%87%AA%E5%8A%A8%E7%AD%BE%E5%88%B0/gphhmijanbcbckphcjkfkoccofhmjhdn](https://chrome.google.com/webstore/detail/%E8%87%AA%E5%8A%A8%E7%AD%BE%E5%88%B0/gphhmijanbcbckphcjkfkoccofhmjhdn) -访问一些可以签到的网站如淘宝,一号店,点评,苏宁,虾米等,如果已登录该插件可以自动签到挣取积分。 \ No newline at end of file +访问一些可以签到的网站如淘宝,百度贴吧,点评,一号店,苏宁,爱奇艺,虾米,天猫美妆,微盘,数米基金网等,如果已登录该插件可以自动签到挣取积分。 \ No newline at end of file diff --git a/js/qiandao/tmall.js b/js/qiandao/tmall.js index 4905f50..f50daec 100644 --- a/js/qiandao/tmall.js +++ b/js/qiandao/tmall.js @@ -12,9 +12,11 @@ chrome.runtime.sendMessage({ method: "setLocalStorage", key: "tmall_mei_status", val: today }, function(res) {}); - chrome.runtime.sendMessage({ - method: "setLocalStorage", key: "tmall_mei_points", val: t.availableDays - }, function(res) {}); + if (t.availableDays > 0) { + chrome.runtime.sendMessage({ + method: "setLocalStorage", key: "tmall_mei_points", val: t.availableDays + }, function(res) {}); + } } } diff --git a/manifest.json b/manifest.json index 87bfa11..b269dac 100755 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "short_name": "签到", "version": "0.0.9", "manifest_version": 2, - "description": "访问时如果已登陆则在淘宝,百度贴吧,点评,一号店,苏宁,爱奇艺,虾米,微盘,数米基金网等网站自动签到。", + "description": "访问时如果已登陆则在淘宝,百度贴吧,点评,一号店,苏宁,爱奇艺,虾米,天猫美妆,微盘,数米基金网等网站自动签到。", "homepage_url": "http://fayland.me/", "icons": { "16": "icons/icon16.png", diff --git a/src/browser_action/browser_action.html b/src/browser_action/browser_action.html index 93c9d1b..4177db6 100755 --- a/src/browser_action/browser_action.html +++ b/src/browser_action/browser_action.html @@ -54,6 +54,10 @@ 数米基金网- 访问 + + 天猫美妆- + 访问 + \ No newline at end of file diff --git a/src/browser_action/browser_action.js b/src/browser_action/browser_action.js index b285baa..d4d8331 100644 --- a/src/browser_action/browser_action.js +++ b/src/browser_action/browser_action.js @@ -14,7 +14,8 @@ 'tieba_status', 'weipan_status', 'weipan_points', 'fund123_status', - 'iqiyi_status', 'iqiyi_points' + 'iqiyi_status', 'iqiyi_points', + 'tmall_mei_status', 'tmall_mei_points' ]; $.each(ele, function(i, v) { $('#' + v).text(localStorage.getItem(v));