[or-cvs] [torbutton/master 22/30] Lie about our window size even if we didn't get a chance to round it.
mikeperry at torproject.org
mikeperry at torproject.org
Fri Apr 9 22:54:00 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: 2c5a4efaf18720c8ff23fe0d5892c312b1151bdc
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