Skip to content

Commit

Permalink
Fix dianping, remove suning
Browse files Browse the repository at this point in the history
  • Loading branch information
fayland committed Oct 12, 2014
1 parent e31c231 commit dd5973e
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 59 deletions.
4 changes: 2 additions & 2 deletions js/qiandao/dianping.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

$(doc).ready(function() {
// only do it when login
if ($('.user-logged').length) {
if ($('.J-user').length) {
chrome.runtime.sendMessage({method: "getLocalStorage", key: "dianping_status"}, function(res) {
var status = res.data;
var today = (new Date()).toDateString();
if (! (status && today === status)) {
$.getJSON('http://www.dianping.com/ajax/member/signIn/signIn', function(data) {
if (data.signInResult) {
if (data.signInResult || data.code == 210) {
chrome.runtime.sendMessage({
method: "setLocalStorage", key: "dianping_status", val: today
}, function(res) {});
Expand Down
47 changes: 0 additions & 47 deletions js/qiandao/suning.js

This file was deleted.

5 changes: 0 additions & 5 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@
"js": [ "js/zepto.min.js", "js/qiandao/dianping.js" ],
"run_at": "document_end"
},
{
"matches": [ "http://*.suning.com/*" ],
"js": [ "js/zepto.min.js", "js/qiandao/suning.js" ],
"run_at": "document_end"
},
{
"matches": [ "http://*.xiami.com/*", "http://xiami.com/*" ],
"js": [ "js/zepto.min.js", "js/qiandao/xiami.js" ],
Expand Down
5 changes: 1 addition & 4 deletions src/browser_action/browser_action.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
padding: 10px;
height: auto;
width: 400px;
font-size: 12px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
</style>
Expand All @@ -34,10 +35,6 @@
<td>点评</td><td id='dianping_status'></td><td id='dianping_points'>-</td>
<td><a href='http://www.dianping.com/' target='_blank'>访问</a></td>
</tr>
<tr>
<td>苏宁</td><td id='suning_status'></td><td id='suning_points'>-</td>
<td><a href='http://vip.suning.com/' target='_blank'>访问</a></td>
</tr>
<tr>
<td>爱奇艺</td><td id='iqiyi_status'></td><td id='iqiyi_points'>-</td>
<td><a href='http://www.iqiyi.com/u/' target='_blank'>访问</a></td>
Expand Down
1 change: 0 additions & 1 deletion src/browser_action/browser_action.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
'taobao_status', 'taobao_points',
'yhd_status',
'dianping_status',
'suning_status', 'suning_points',
'xiami_status', 'xiami_points',
'tieba_status',
'weipan_status', 'weipan_points',
Expand Down

0 comments on commit dd5973e

Please sign in to comment.