summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-17 13:02:07 +0000
committerSarven Capadisli <csarven@status.net>2009-11-17 13:02:07 +0000
commit79f34728afa652531cdd6b04a0acf1cce1072a15 (patch)
treed63d6b222609033b7fb6a109069da20b25b2b07a /plugins
parent74f33abf516009ad1ec785fca2208181f27d693d (diff)
Calling selector once
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Realtime/realtimeupdate.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index 78d3440a9..4f0b01119 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -180,12 +180,14 @@ RealtimeUpdate = {
addPopup: function(url, timeline, iconurl)
{
- $('#notices_primary').css({'position':'relative'});
- $('#notices_primary').prepend('<button id="realtime_timeline" title="Pop up in a window">Pop up</button>');
+ var NP = $('#notices_primary');
+ NP.css({'position':'relative'});
+ NP.prepend('<button id="realtime_timeline" title="Pop up in a window">Pop up</button>');
- $('#realtime_timeline').css({
+ var RT = $('#realtime_timeline');
+ RT.css({
'margin':'0 0 11px 0',
- 'background':'transparent url('+ iconurl + ') no-repeat 0% 30%',
+ 'background':'transparent url('+ iconurl + ') no-repeat 0 30%',
'padding':'0 0 0 20px',
'display':'block',
'position':'absolute',
@@ -193,13 +195,13 @@ RealtimeUpdate = {
'right':'0',
'border':'none',
'cursor':'pointer',
- 'color':$("a").css("color"),
+ 'color':$('a').css('color'),
'font-weight':'bold',
'font-size':'1em'
});
$('#showstream #notices_primary').css({'margin-top':'18px'});
- $('#realtime_timeline').click(function() {
+ RT.click(function() {
window.open(url,
timeline,
'toolbar=no,resizable=yes,scrollbars=yes,status=yes,width=500,height=550');