Skip to content

Instantly share code, notes, and snippets.

@amboy00
Created October 10, 2013 20:58
Show Gist options
  • Save amboy00/6925566 to your computer and use it in GitHub Desktop.
Save amboy00/6925566 to your computer and use it in GitHub Desktop.
Not sure entirely what this does, but keeping it anyway.
$(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