Created
April 5, 2011 01:04
-
-
Save leedo/902813 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var move = function(e) { | |
var width = document.viewport.getWidth(); | |
var left = windows.hasClassName('nicklist') ? 200 : 100; | |
var visible = toggle.hasClassName('visible'); | |
if (!visible && width - e.pointerX() > left) | |
return; | |
window.onmousemove = null; | |
toggle.addClassName('visible'); | |
var end = function() { | |
toggle.removeClassName('visible'); | |
window.onmousemove = move; | |
}; | |
var end_timer = setTimeout(end, 1500); | |
setTimeout(function() { | |
window.onmousemove = function() { | |
clearTimeout(end_timer); | |
end_timer = setTimeout(end, 1500); | |
}; | |
}, 1000); | |
}; | |
window.onmousemove = move; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment