Skip to content

Instantly share code, notes, and snippets.

@leedo
Created April 5, 2011 01:04
Show Gist options
  • Save leedo/902813 to your computer and use it in GitHub Desktop.
Save leedo/902813 to your computer and use it in GitHub Desktop.
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