Created
February 12, 2011 02:43
-
-
Save miya2000/823432 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name jQuery - fix window height (for jQuery version 1.2.x.) | |
// ==/UserScript== | |
(function() { | |
function main() { | |
if (typeof jQuery == 'undefined') return; | |
if (!/^1\.2\./.test(jQuery.fn.jquery)) return; | |
var height_ = jQuery.fn.height; | |
jQuery.fn.height = function() { | |
if ( this[0] == window && jQuery.browser.opera && jQuery.browser.version >= 9.50) | |
return window.innerHeight; | |
else return height_.apply(this, arguments); | |
}; | |
} | |
document.addEventListener('DOMContentLoaded', main, false); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment