summaryrefslogtreecommitdiff
path: root/plugins/Realtime/realtimeupdate.js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2009-11-11 12:31:14 +0000
committerSarven Capadisli <csarven@status.net>2009-11-11 12:31:14 +0000
commit3874269a0b3ba81a1813cc282356618bb02d0f20 (patch)
tree7c1da66bf21339c1229e1a3834e4ac4dc80f8612 /plugins/Realtime/realtimeupdate.js
parentd6cd083946be96bcfc64329fc0bfdd28261c82ef (diff)
Calling selector once
Diffstat (limited to 'plugins/Realtime/realtimeupdate.js')
-rw-r--r--plugins/Realtime/realtimeupdate.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Realtime/realtimeupdate.js b/plugins/Realtime/realtimeupdate.js
index a2af4007b..ebe94ca41 100644
--- a/plugins/Realtime/realtimeupdate.js
+++ b/plugins/Realtime/realtimeupdate.js
@@ -157,10 +157,12 @@ 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%',
'padding':'0 0 0 20px',
@@ -170,12 +172,12 @@ RealtimeUpdate = {
'right':'0',
'border':'none',
'cursor':'pointer',
- 'color':$("a").css("color"),
+ 'color':$('a').css('color'),
'font-weight':'bold',
'font-size':'1em'
});
- $('#realtime_timeline').click(function() {
+ RT.click(function() {
window.open(url,
timeline,
'toolbar=no,resizable=yes,scrollbars=yes,status=yes');