Commits

Kevin Wetzels  committed 44c987c

Still setting up Sublime; tabs to spaces

  • Participants
  • Parent commits aca060d

Comments (0)

Files changed (1)

File google.com.js

 (function() {
-	
-	var counters = {};
+    
+    var counters = {};
 
-	var whenPresent = function(selector, cb, timeout, maxAttempts) {
-		timeout = timeout || 100;
-		maxAttempts = maxAttempts || 5;
-		var el = $(selector);
-		if (el.length) {
-			cb(el);
-		} else {
-			var count = counters[selector];
-			if (!count) {
-				count = 0;
-			}
-			if (count < maxAttempts) {
-				setTimeout(function() {
-					whenPresent(selector, cb, timeout, maxAttempts);
-				}, timeout);
-				counters[selector] = ++count;	
-			}
-		}
-	}
+    var whenPresent = function(selector, cb, timeout, maxAttempts) {
+        timeout = timeout || 100;
+        maxAttempts = maxAttempts || 5;
+        var el = $(selector);
+        if (el.length) {
+            cb(el);
+        } else {
+            var count = counters[selector];
+            if (!count) {
+                count = 0;
+            }
+            if (count < maxAttempts) {
+                setTimeout(function() {
+                    whenPresent(selector, cb, timeout, maxAttempts);
+                }, timeout);
+                counters[selector] = ++count;   
+            }
+        }
+    }
 
-	var clearPreview = function() {
-		whenPresent('#ires div.vspib', function(el) {
-			el.remove();
-		});
-	};
+    var clearPreview = function() {
+        whenPresent('#ires div.vspib', function(el) {
+            el.remove();
+        });
+    };
 
-	var clearLinks = function() {
-		whenPresent('#ires a.l', function(el) {
-			el.removeAttr('onmousedown');
-			// The preview chevrons seem to be loaded afterwards, so start 
-			// cleaning them up now
-			clearPreview();
-		});
-	};
+    var clearLinks = function() {
+        whenPresent('#ires a.l', function(el) {
+            el.removeAttr('onmousedown');
+            // The preview chevrons seem to be loaded afterwards, so start 
+            // cleaning them up now
+            clearPreview();
+        });
+    };
 
-	clearLinks();
+    clearLinks();
 
 })();