changed plugin API for more functionality
This commit is contained in:
parent
9ba76d7bc7
commit
2bb3156500
6 changed files with 15 additions and 12 deletions
|
@ -10,12 +10,8 @@ function Twittia(action, oauth_key, oauth_secret) {
|
|||
|
||||
this.body = document.createElement("ol");
|
||||
this.body.className = this.action;
|
||||
document.getElementsByTagName("body")[0].appendChild(this.body);
|
||||
|
||||
setTimeout(function() { loadPlugin(controller.pluginURL()) }, 1);
|
||||
}
|
||||
|
||||
|
||||
Twittia.prototype.newStatus = function(status, supress_new_with_timeout) {
|
||||
if(status != null) {
|
||||
for(var i = status.length-1, c=0; i>=c; --i) {
|
||||
|
@ -34,10 +30,11 @@ Twittia.prototype.newStatus = function(status, supress_new_with_timeout) {
|
|||
var _this = this;
|
||||
setTimeout(function() { _this.getNewData() }, this.timeout);
|
||||
}
|
||||
if(this.action == "mentions") {
|
||||
if(this.action == "mentions" && this.is_not_init) {
|
||||
this.unread_mentions += status.length;
|
||||
controller.unreadMentions_(this.unread_mentions);
|
||||
}
|
||||
this.is_not_init = true;
|
||||
}
|
||||
|
||||
Twittia.prototype.getItem = function(status) {
|
||||
|
|
Reference in a new issue