Permalink
Browse files

the main closure only receives a reference to the window object

jQuery and "twttr" are looked up later
  • Loading branch information...
1 parent aac606f commit 56caba502b0aab3af11fc8ead9173778e5c1b4f6 @mislav committed Mar 27, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 endless_tweets/endless_tweets.user.js
@@ -6,13 +6,13 @@
// @include https://twitter.com/*
// ==/UserScript==
-var _realWindow = typeof jQuery == "undefined" ? unsafeWindow : window
-
-;(function(jQuery, twttr){
+(function(realWindow){
//= gm_functions
var timeline = $('timeline'),
+ jQuery = realWindow.jQuery,
+ twttr = realWindow.twttr,
currentUser = selectString('meta[@name="session-user-screen_name"]/@content'),
currentPage = document.body.id,
debugMode = getValue('debugMode', false),
@@ -660,4 +660,4 @@ function reveal(element) {
// get a reference to the jQuery object, even if it requires
// breaking out of the GreaseMonkey sandbox in Firefox
// (we need to trust Twitter.com)
-})(_realWindow.jQuery, _realWindow.twttr)
+})(typeof jQuery == "undefined" ? unsafeWindow : window)

0 comments on commit 56caba5

Please sign in to comment.