]> git.wh0rd.org Git - tt-rss.git/commitdiff
add simple plugin to prevent tt-rss tab flashing on new articles
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 25 Jul 2013 10:54:46 +0000 (14:54 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 25 Jul 2013 10:54:46 +0000 (14:54 +0400)
plugins/no_title_counters/init.js [new file with mode: 0644]
plugins/no_title_counters/init.php [new file with mode: 0644]

diff --git a/plugins/no_title_counters/init.js b/plugins/no_title_counters/init.js
new file mode 100644 (file)
index 0000000..9c16856
--- /dev/null
@@ -0,0 +1,5 @@
+dojo.addOnLoad(function() {
+       updateTitle = function() {
+               document.title = "Tiny Tiny RSS";
+       };
+});
diff --git a/plugins/no_title_counters/init.php b/plugins/no_title_counters/init.php
new file mode 100644 (file)
index 0000000..a9f2283
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+class No_Title_Counters extends Plugin {
+       private $host;
+
+       function about() {
+               return array(1.0,
+                       "Remove counters from window title (prevents tab flashing on new articles)",
+                       "fox");
+       }
+
+       function init($host) {
+               $this->host = $host;
+
+       }
+
+       function get_js() {
+               return file_get_contents(__DIR__ . "/init.js");
+       }
+
+       function api_version() {
+               return 2;
+       }
+
+}
+?>