From 5e8512f12d76d461f62176a9736a43943de652f7 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sun, 25 Aug 2013 20:33:07 +0200 Subject: [PATCH] bugfix --- js/dom-functions-1.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/js/dom-functions-1.js b/js/dom-functions-1.js index 27db220..a0700d4 100644 --- a/js/dom-functions-1.js +++ b/js/dom-functions-1.js @@ -413,12 +413,14 @@ function setNewCurrentStream(stream,actionOnSuccess,setLocation) { if(window.currentStream == stream) { // change link color - if(window.userLinkColor.length == 6) { - changeLinkColor('#' + window.userLinkColor); - } - else { - changeLinkColor('#0084B4'); - } + if(typeof window.userLinkColor != 'undefined') { + if(window.userLinkColor.length == 6) { + changeLinkColor('#' + window.userLinkColor); + } + else { + changeLinkColor('#0084B4'); + } + } // get screen name from stream, if not found, this is me if(stream.indexOf('screen_name=')>-1) { @@ -452,13 +454,15 @@ function setNewCurrentStream(stream,actionOnSuccess,setLocation) { if(window.currentStream == stream) { // change link color - if(window.userLinkColor.length == 6) { - changeLinkColor('#' + window.userLinkColor); - } - else { - changeLinkColor('#0084B4'); + if(typeof window.userLinkColor != 'undefined') { + if(window.userLinkColor.length == 6) { + changeLinkColor('#' + window.userLinkColor); + } + else { + changeLinkColor('#0084B4'); + } } - + // show profile card if this is a user's queet stream if(stream.substring(0,27) == 'statuses/user_timeline.json') { var thisUsersScreenName = stream.replace('statuses/user_timeline.json','').replace('?screen_name=','').replace('?id=','').replace('?user_id=','');