Changeset 74

User picture

Author: frojo56

(2009/02/27 17:12) Almost 3 years ago

Um, yeah, last post, not right. *Now* there is no highlighting when on your own profile.

Affected files

Updated twitter_fantastico.user.js Download diff

7374
57
var current_script_length = 26574;
57
var current_script_length = 26574;
58
var loaded_tweets = new Array();
58
var loaded_tweets = new Array();
59
59
60
var page_info = {
61
	reUrlSplitUp: function(){
62
			splitup=/https?:\/\/(?:www\.)?twitter.com\/([\w\d]+)(?:\/(statuses)\/(\d+))?(?:\?page=(\d+))?/.exec(location.href)
63
			return splitup;
64
		},
65
	onNonProcessingPage:function(){
66
		if(this.reUrlSplitUp==null)
67
			return true;
68
		return false;
69
	},
70
	onTwitterFriendFeed:function(){
71
		if(this.reUrlSplitUp[1] != null && this.reUrlSplitUp[1] == "home")
72
			return true;
73
		return false;
74
	},
75
	onTwitterIndividualTweet:function(){
76
		if(this.reUrlSplitUp[1] != null && this.reUrlSplitUp[1] != "home")
77
		{
78
			if(this.reUrlSplitUp[3] !=  null)
79
				return true;
80
		}
81
		return false;
82
	},
83
	onTwitterUsersProfile:function(){
84
		
85
	},
86
	onOwnProfilePage:function(){},
87
	pageNumber:1,
88
	loading:false,
89
	onLastPage:false
90
};
60
91
61
if (typeof GM_xmlhttpRequest == "function") 
92
if (typeof GM_xmlhttpRequest == "function") 
62
{
93
{
...
...
87
	}
118
	}
88
}
119
}
89
120
90
j(document).ready(function(){
121
j(document).ready(function(){	
91
	j('head').append("<style type='text/css'>"+page_css()+"</style>");
92
	//Don't try to get data when user is on twitter's homepage, and not logged in yet.
122
	//Don't try to get data when user is on twitter's homepage, and not logged in yet.
93
	log("Document ready. Determining what page the user is on.");
123
	log("Document ready. Determining what page the user is on.");
94
	log("Current Username: " + current_username);
124
	log("Current Username: " + current_username);
125
95
	determine_what_page_user_is_on();
126
	determine_what_page_user_is_on();
127
	j('head').append("<style type='text/css'>"+page_css()+"</style>");
96
	log("Loading page data");
128
	log("Loading page data");
97
	//load_page(false,useJQXHR);
129
	//load_page(false,useJQXHR);
98
	load_page(useJQXHR,false);
130
	load_page(useJQXHR,false);
...
...
533
			else
565
			else
534
			{
566
			{
535
				onTwitterUsersProfile=true;
567
				onTwitterUsersProfile=true;
536
				top_profile_link = j("#navigation .top-nav #profile_link").attr("href");
568
				top_profile_link_name = /https?:\/\/twitter.com\/([\w\d]+)/.exec(j.trim(j("#navigation .top-nav #profile_link").attr("href")))[1];
537
				profile_link = j("#content .wrapper h2.thumb a:first").attr("href");
569
				user_name = j.trim(j("#content .wrapper h2.thumb").text());
538
				if(top_profile_link == profile_link)
570
				log('(determine page)user_name:'+ user_name);
571
				log('(determine page)top_profile_link username: '+top_profile_link_name)
572
				if(top_profile_link_name == user_name)
539
					onOwnProfilePage=true;
573
					onOwnProfilePage=true;
540
			}
574
			}
541
575