Page 1 of 1

Customizable site title

Posted: 20 Mar 2013, 11:23
by richbeales
Hi,

I've created https://github.com/gothfox/Tiny-Tiny-RSS/pull/53 which allows you to change the page title from "Tiny Tiny RSS" to "TT-RSS" or anything you choose. It maintains the unread count, and if you have several browser tabs open, a shorter title allows you to still see the unread count.

Fox - Let me know if this needs more work before it can be merged?

Re: Customizable site title

Posted: 22 Mar 2013, 00:27
by richbeales
I've updated this to work with the unread count now appearing before the site title.
Also, it should work without forcing people to define it in their config.php

Re: Customizable site title

Posted: 22 Mar 2013, 08:43
by fox
OK I missed that. We're not adding a yet-another constant in config.php-dist, there's way to much stuff in there already; I'll take a look at this later today.

Re: Customizable site title

Posted: 12 Apr 2013, 05:29
by jdelamater99
Hey, I think I noticed a bug in the modified updateTitle function. I was getting an ever increasing string of (#) in the title bar.
ttrss_title.jpg
ttrss_title.jpg (20.48 KiB) Viewed 2128 times


never mind all the code that I just posted, if you saw it. It got rid of the increasing string, but it was only leaving the last number, which apparently was the oldest, so that's not correct either. But I think I know what needs to change.

Ok, here's the code, that appears to be working properly now.
in js/tt-rss.js
replace

Code: Select all

if (tmp.indexOf('(')>0)
    {
       tmp = tmp.substr(0,tmp.lastIndexOf('('));
    }


with

Code: Select all

if (tmp.indexOf("(") != -1){
      tmp = tmp.substr(tmp.lastIndexOf(") ")+2, tmp.length);
   }