Flutterz Posted March 16, 2014 Posted March 16, 2014 This seems like something that would help people know that they have a new notification and should go on Fuwa - have the title of the page contain the number of unread notifications (+ number of unread PMs?) and automatically update it every minute or so. I have email notifications disabled for new posts in followed topics because having them enabled would quickly make them 99% of the emails I get, but it would still be nice to have some way of knowing about updates on Fuwa without having to manually refresh the tab every time. Here's an example of how it could look: Edit: Luch made a script that does exactly this, thanks!http://www.elisanet.fi/luch/Fuwa_title_notification_number.user.js
Nosebleed Posted March 16, 2014 Posted March 16, 2014 Not a bad idea. It'd be kind of like facebook pretty much. Not sure if it's possible or not but i'd support this.
Steve Posted March 16, 2014 Posted March 16, 2014 Hm, checked about this but there doesn't seem to be any addon for IPB to do this. You can set auto-refresh on the page in browser, for like 10 minutes or something should be fine, I usually end up refreshing more often than that myself when I'm active though. The only option that comes to mind is an userscript or addon for a browser that would make the number on the bell also show on the tab, combine it with auto refresh and it could work. (but you'd have to find someone to write it for you xD).
Flutterz Posted March 16, 2014 Author Posted March 16, 2014 Hm, checked about this but there doesn't seem to be any addon for IPB to do this. You can set auto-refresh on the page in browser, for like 10 minutes or something should be fine, I usually end up refreshing more often than that myself when I'm active though. The only option that comes to mind is an userscript or addon for a browser that would make the number on the bell also show on the tab, combine it with auto refresh and it could work. (but you'd have to find someone to write it for you xD). Is it possible to have someone code one? Also auto-refresh wouldn't help, since I still would have to go to the Fuwa tab to know if anything new has happened.
Steve Posted March 16, 2014 Posted March 16, 2014 Is it possible to have someone code one? Well it certainly is possible, but you will have to find the chosen one. I am thinking that userscripts for greasemonkey or tampermonkey would be the easiest way, you would need to read one element of the code (the notification number) and add that number to the header of the website, shouldn't be anything hard for an experienced scripter. So if anyone here knows how to do it or you know someone who can make scripts, it can be done. Maybe luch would know how to do it, he made an awesome youtube userscript for me.
Star Posted March 16, 2014 Posted March 16, 2014 its doable for IPB, you just need to write a code which reads the Nofitication Variable and add the number to the title screen, could be quite a hassle when incorporating it as an optional though but would you really need one though? isn't a big number at the top of a page showing notifications/pm's not enough
Flutterz Posted March 16, 2014 Author Posted March 16, 2014 its doable for IPB, you just need to write a code which reads the Nofitication Variable and add the number to the title screen, could be quite a hassle when incorporating it as an optional though but would you really need one though? isn't a big number at the top of a page showing notifications/pm's not enough I browse a lot of sites at the same time, so knowing that there's something new on a site without having to open its tab is a huge boon.
OriginalRen Posted March 16, 2014 Posted March 16, 2014 I browse a lot of sites at the same time, so knowing that there's something new on a site without having to open its tab is a huge boon. Heheh...huge boon. Also I support this idea.
Luch Posted March 17, 2014 Posted March 17, 2014 Grease/Tampermonkey script: http://www.elisanet.fi/luch/Fuwa_title_notification_number.user.js Update interval set to 5 minutes, not sure if that is too low. Tested it for few minutes on chrome and ff so maybe it works lol. Flutterz 1
Steve Posted March 17, 2014 Posted March 17, 2014 Works fine. Not that it has any use for me, I refresh fuwanovel more often than that anyways when I'm using browser xD But all praise the Luch~
Flutterz Posted March 17, 2014 Author Posted March 17, 2014 Thanks! Now if someone posts something ever I'll be able to see if it works. Does it count unread PMs too? Edit: Doesn't seem to be working for me. :/ I even set the timer to 30 seconds in the script and re-added it, just to make sure the problem wasn't my impatience, but it still didn't work. You just drag and drop it into the extensions window, right?
Luch Posted March 17, 2014 Posted March 17, 2014 User scripts installed in the Chrome extensions page are isolated from the page context and cannot access any of its JavaScript functions. You will need to add Tampermonkey to your browser (Greasemonkey on FF) and add the script there.
Flutterz Posted March 17, 2014 Author Posted March 17, 2014 Okay, it works now! Thanks! Just 2 things: - It changes the name of every page to "Fuwanovel" even when it should be the name of the forums topic you're in, so it'd be great if you could make it use the original page name - Does it count unread PMs? Edit: I fixed the first thing myself, here's the new setTitle: function setTitle(number) { var pagename = document.title; if(number > 0) { document.title = "(" + number + ")" + " " + pagename; } else { document.title = pagename; }
Luch Posted March 17, 2014 Posted March 17, 2014 Nice. Also updated it, http://www.elisanet.fi/luch/Fuwa_title_notification_number.user.js And yes it does count unread messages too.
Flutterz Posted June 30, 2015 Author Posted June 30, 2015 In case anybody but me uses this and cares, the new chatbox broke this script (so did the transition to .net but that was a trivial fix) so I ended up modifying it to work with the new chatbox. Could probably have been done a bit more elegantly, but meh. http://pastebin.com/gmkNB2Xm
Recommended Posts