• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!doctype html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<title>Long Page</title>
6<script type="text/javascript">
7var startX;
8var startY;
9var cursorOnPage = false;
10var pageReady = false;
11var userWidth = screen.width;
12var userHeight = screen.height;
13
14function onLoad() {
15    document.addEventListener('mousedown', mouseDown);
16    document.addEventListener('mouseup', mouseUp);
17    var mainDiv = document.getElementById("longPage")
18    mainDiv.style.width = parseInt(userWidth * 15) + "px";
19    mainDiv.style.height = parseInt(userHeight * 15) + "px";
20    pageReady = true;
21}
22
23function mouseUp(e) {
24    cursorOnPage = ((e.pageX !=0) || (e.pageY !=0))
25    clickCount = clickCount + 1;
26    console.log(clickCount, cursorOnPage)
27}
28
29function mouseDown(e) {
30    startX = e.pageX;
31    startY = e.pageY;
32}
33
34</script>
35</head>
36<body onload="onLoad()">
37<div id="longPage"></div>
38</body>
39</html>
40