|
#1
|
||
|
So, about 16 FLS staff have embraced Twitter in posting short updates to what they're doing.
I first used the RSS feeds of each person to make my own little tracker. But then decided I'd just sign up myself too. The only thing this given 'tracker' is missing imo, is that you have to remember what posts you have already read. Not anymore! Thanks to the following Greasemonkey script you'll be able to mark what posts you've already read, and that stays stored in a cookie. With this I'll be taking down the tracker that I didn't really publish. Just join Twitter yourself! FLS_Misha: http://twitter.com/FLS_Misha Me myself an I: http://twitter.com/ArmEagle (listing all the FLSers I'm following myself) Code:
// ==UserScript==
// @name NewTwitters
// @author ArmEagle
// @namespace http://armeagle.nl
// @description Add a simple way to keep track of what messages you haven't read yet
// @include http://twitter.com/home/*
// ==/UserScript==
// The background color for a marked post is set about 15 lines below this : var read_style = "background-color:
// The background color for the 'Mark All Read' 'tab' is set about 6 lines below this.
// Feel free to modify that
try {
// add a link to mark all posts here read.
var li_markread = document.createElement('li');
li_markread.innerHTML = '<a href="javascript:setLastIDcookie(1);" style="background-color: #aa9999;">Mark All Read</a>';
var ul = document.getElementById('tabMenu');
ul.appendChild(li_markread);
// add a script element
var script_element = document.createElement('script');
script_element.setAttribute('type', 'text/javascript');
// start of a multiline string
script_element.innerHTML = ""+<r><![CDATA[
var read_style = "background-color: #cccccc";
// get the last ID and store that in a cookie
function setLastIDcookie() {
setLastIDcookie(false);
}
function setLastIDcookie(doMarkPosts) {
var id = document.getElementById('timeline').getElementsByTagName('tr')[0].getAttribute('id').substring(7);
eraseCookie('lastReadID');
createCookie('lastReadID', id, 365);
if (doMarkPosts) {
markPosts();
}
}
// mark all posts read, based on the cookie value
function markPosts() {
// get the last read cookie ID, if any
var lastReadID = readCookie('lastReadID');
if ( lastReadID != null ) {
// if any, go trough all rows in the timeline table and mark them by the background color
var timeline_rows = document.getElementById('timeline').getElementsByTagName('tr');
// go from last to first, so we can jump out the moment we find a newer post
for ( index=timeline_rows.length-1; index >= 0; index-- ) {
// check the ID. if it's larger than the lastReadID, then break out
var row = timeline_rows[index];
if ( row.getAttribute('id').substring(7)*1 > lastReadID*1 ) {
break;
}
row.setAttribute('style', read_style);
}
}
}
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = '; expires='+date.toGMTString();
}
else var expires = '';
document.cookie = name+"="+value+expires+'; path=/';
}
function readCookie(name) {
var nameEQ = name + '=';
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name,'',-1);
}
markPosts();
]]></r>; // end of the multiline string
// add it to the head element
document.getElementsByTagName('head')[0].appendChild(script_element);
} catch (err) {
alert(err);
}
I added an attachment with a screenshot of my Twitter page with the two changes. The top arrow points to a new button. Pressing this marks up to the last twitter post you see (so you can use it on the pages showing older posts too). The bottom arrow shows the last marked twitter post; a gray background. It's that simple!
__________________
Visit Online PotBS Maps & Server Stats for online worldmaps, latest unrest changes and recent events! ArmEagle, you never cease to amaze me. <3 -Misha |
|
|
Last edited by ArmEagle : 10-08-2008 at 08:37 AM. |
||
|
#2
|
||
|
I'm being dense but
1) I don't use FireFox. (Stuck w/ IE for our CS tools.) Can I still use GreaseMonkey? 2) If so, what exactly do I do after I d/l it?
__________________
-Misha |
|
|
|
||
|
#3
|
||
|
Greasemonkey is a Firefox-only plugin, I believe. So, Misha, you're left in the cold. Maybe you should consider switching
![]() |
|
|
|
||
|
#4
|
|||
|
Uh oh...
Quote:
Nah, just kiddin', you can. Here is the link you're looking for: http://www.gm4ie.com/ Don't ban me!!!
__________________
Sir Richard Holcombe Retired Privateer; living happily in my luxuries, gained on land and sea “A good skipper avoids the storm he cannot weather, and weathers the storm he cannot avoid.” |
||
|
Last edited by sailorman_glh : 09-03-2008 at 03:42 PM. |
|||
|
#5
|
||
|
Oh, hey Misha.
[striketrough]1. No, GreaseMonkey is only an addon for Firefox. It lets you run Javascript code on specific webpages.[/striketrough] (Yes I know this doesn't work, but it should!). Well I guess I was proven wrong about this . I have no clue whether my code works in GM4IE though. And am currently on Linux, which treats my hardware so much better, so I can't test it myself either.GreaseMonkey isn't really user friendly though, but if you want to get it working I'll be happy to help anyone on IRC.
__________________
Visit Online PotBS Maps & Server Stats for online worldmaps, latest unrest changes and recent events! ArmEagle, you never cease to amaze me. <3 -Misha |
|
|
Last edited by ArmEagle : 09-03-2008 at 03:44 PM. |
||
|
#6
|
||
|
1) You can't use Greasemonkey on IE, since it's a Firefox addon. However, there's an extension to IE named IE7Pro that provides similar functionality (and more) for IE7 (I hope you're not stuck on IE6).
2) Add the above script to a user defined script for www.twitter.com. There's a link to a video tutorial how to do so on the IE7Pro page. I don't know whether the script will work, though... |
|
|
|
||
|
#7
|
|||
|
You lost me here, how can you not use Firefox?
![]()
__________________
Quote:
|
||
|
|
|||
|
#8
|
||
|
Btw, also check my other two GreaseMonkey scripts:
- http://www.burningsea.com/forums/sho...d.php?p=396982 ('improves' the devtracker') - http://www.burningsea.com/forums/sho...d.php?p=272588 (an easy accessible 'mark all posts read' link for the subforums)
__________________
Visit Online PotBS Maps & Server Stats for online worldmaps, latest unrest changes and recent events! ArmEagle, you never cease to amaze me. <3 -Misha |
|
|
|
||
|
#9
|
||
|
I'm trying to figure out how you add everyone to your follow list, nice and quick. Care to help?
EDIT: Well the best way seemed to be, to go to Misha's following's and start following those. Hope she wasn't missing anyone and wasn't following any serial killers ![]()
__________________
# _#### ()### #((alico# ||ane ######[_|### |
|
|
Last edited by moriwenne : 09-04-2008 at 04:24 AM. |
||
|
#10
|
||
|
Some often read acronyms and terms (feel free to send me more):
Akella: The party FLS is going to work with in Russia (RU) AU: Australia (The Invincible server) BVT: Build Verification Test GH: Guitar Hero RB: Rock Band OP (fraxl): Other Project (sekrit!) CA (Misha): Customer Authentication[?] AC (Rusty): Advertisement Campaign[?]
__________________
Visit Online PotBS Maps & Server Stats for online worldmaps, latest unrest changes and recent events! ArmEagle, you never cease to amaze me. <3 -Misha |
|
|
Last edited by ArmEagle : 09-22-2008 at 08:14 PM. |
||
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -7. The time now is 12:06 PM.








. I have no clue whether my code works in GM4IE though. And am currently on Linux, which treats my hardware so much better, so I can't test it myself either.
Linear Mode
