Skip to content

Commit

Permalink
running notifications on a schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
nitindhar7 committed Apr 20, 2012
1 parent 79ee326 commit 0751c72
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -67,8 +67,8 @@ A simple data access object which saves the authentication token to local storag
- Instant reply to notification
- Tweet notification
- Option to load latest post every XX seconds
- Reply button
- Number of notifications in Rangr browser icon
- Reply button

* * *

Expand Down
47 changes: 3 additions & 44 deletions src/css/login_view.css
Expand Up @@ -12,7 +12,7 @@
margin: 5px;
padding: 10px;
width: 470px;
height: 270px;
height: 210px;
background: #F5F5F5;
-webkit-border-radius: 3px;
}
Expand Down Expand Up @@ -79,7 +79,7 @@

#content {
width: 470px;
height: 200px;
height: 140px;
}

#byline {
Expand All @@ -97,7 +97,7 @@

#login-form {
width: 470px;
height: 175px;
height: 115px;
display: none;
}

Expand Down Expand Up @@ -130,47 +130,6 @@
clear: right;
}

#login-form .check {
margin-left: 140px;
width: 25px;
height: 25px;
float: left;
clear: left;
}

#login-form .check-label {
margin-left: 5px;
width: 300px;
height: 25px;
line-height: 25px;
font-size: 12px;
color: #999;
float: left;
clear: right;
text-shadow: white 1px 1px 0px;
}

#login-form .note-label {
margin-left: 170px;
width: 40px;
height: 25px;
font-weight: bold;
color: #666;
float: left;
clear: left;
text-shadow: white 1px 1px 0px;
}

#login-form .note-content {
width: 260px;
height: 42px;
font-style: italic;
color: #999;
float: left;
clear: right;
text-shadow: white 1px 1px 0px;
}

#login-form .submit {
margin-left: 140px;
width: 58px;
Expand Down
5 changes: 4 additions & 1 deletion src/js/controller/base_controller.js
@@ -1,12 +1,15 @@
chrome.extension.onRequest.addListener(requestHandler);

var NOTIFICATION_TIMEOUT_MILLIS = 1000 * 60 * 15;

var notifications = [];
var notificationsCount = 0;

function requestHandler(request, sender, sendResponse) {

if(request.type == "auth") {
actionNotify();
self.setInterval("actionNotify()", NOTIFICATION_TIMEOUT_MILLIS);
}

}
Expand Down Expand Up @@ -54,7 +57,7 @@ function actionNotify() {
}
else {
// FIXME: handle more gracefully
alert("not logged in!");
alert("You are not logged in!");
}

}
Expand Down
4 changes: 0 additions & 4 deletions src/login_view.html
Expand Up @@ -25,10 +25,6 @@
<input type="text" class="box"/>
<div class="title">Password</div>
<input type="password" class="box"/>
<input type="checkbox" class="check"/>
<div class="check-label">Remember me</div>
<div class="note-label">NOTE:</div>
<div class="note-content">Storing your passwords may allow others to access your Rangr account when using the browser</div>
<input type="submit" value="Sign in" class="submit"/>
<div id="message"></div>
</div>
Expand Down

0 comments on commit 0751c72

Please sign in to comment.