Created
October 10, 2013 20:58
-
-
Save amboy00/6925566 to your computer and use it in GitHub Desktop.
Not sure entirely what this does, but keeping it anyway.
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
$(document).ready(function(){ | |
// Disable page scrolling | |
$("html").css({'overflow': 'hidden'}); | |
// Block arrow keys scrolling | |
document.onkeydown = function(e) { | |
if (!e) e = window.event; | |
if(e){ // IE8 and earlier | |
if(e.keyCode){ | |
var k = e.keyCode; | |
} | |
} | |
else if(e.which){ // IE9/Firefox/Chrome/Opera/Safari | |
var k = e.which; | |
} | |
if(k >= 37 && k <= 40){ | |
return false; | |
} | |
} | |
// For QA purpose | |
var queryParam = location.search.substr(location.search.indexOf("?")+1).split('&')[0].split('='); | |
if(queryParam[0] == 'pausestitial') { | |
setTimeout(function() { SugarAds.dfp._stitialPauseFuse(); }, (queryParam[1]) ? parseInt(queryParam[1])+parseInt(stitialStartDelay) : defaultPauseSeconds); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment