Added a notice to the timeline window how many unread mentions there are.
+Changed the plugin API to support more functionality.
+Fixed some wrong links.
Fixed problem with closed timeline window.
diff --git a/TwittiaCore.js b/TwittiaCore.js index 818de42..5529eea 100644 --- a/TwittiaCore.js +++ b/TwittiaCore.js @@ -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) { diff --git a/Twittia_2-Info.plist b/Twittia_2-Info.plist index a2c6312..538a5c6 100644 --- a/Twittia_2-Info.plist +++ b/Twittia_2-Info.plist @@ -40,9 +40,9 @@