[or-cvs] [torbutton/maint-1.2 27/37] Lie about our window size even if we didn't get a chance to round it.

mikeperry at torproject.org mikeperry at torproject.org
Thu Apr 8 06:24:30 UTC 2010


Author: Mike Perry <mikeperry-git at fscked.org>
Date: Sat, 3 Apr 2010 18:21:28 -0700
Subject: Lie about our window size even if we didn't get a chance to round it.
Commit: 3cb9ed8b6fa868d542b882ef4ba792c43934f6ab

Patch from outofwords.
---
 src/chrome/content/jshooks.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/chrome/content/jshooks.js b/src/chrome/content/jshooks.js
index a80c9fc..b856922 100644
--- a/src/chrome/content/jshooks.js
+++ b/src/chrome/content/jshooks.js
@@ -97,6 +97,10 @@ window.__HookObjects = function() {
 
   // No pref for this.. Should be mostly harmless..
   if(true) {
+      var origHeight = window.innerHeight;
+      var origWidth = window.innerWidth;
+      window.__proto__.__defineGetter__("innerHeight", function() { return Math.round(origHeight/50.0)*50;});
+      window.__proto__.__defineGetter__("innerWidth", function() { return Math.round(origWidth/50.0)*50;});
       window.__proto__.__defineGetter__("outerWidth", function() { return window.innerWidth;});
       window.__proto__.__defineGetter__("outerHeight", function() { return window.innerHeight;});
       window.__proto__.__defineGetter__("screenX", function() { return 0;});
-- 
1.6.5




More information about the tor-commits mailing list