Last active
March 8, 2017 05:53
-
-
Save pingyen/0cc85882bac2f46d2a7f0ca1a346ccad to your computer and use it in GitHub Desktop.
Bookmarklet of Scroll Event Logger
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
| javascript:(function(){var a=document.createElement("div");a.style.cssText="position: fixed;bottom: 10px;right: 10px;padding: 10px;background: yellow;z-index: 2147483647";window.console={log:function(b){a.innerHTML+=b+"<br />\n"}};"loading"!==document.readyState?document.body.appendChild(a):document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(a)},!1);var c=document.body.scrollTop,d=Date.now();window.addEventListener("scroll",function(b){b=document.body.scrollTop;var a=Date.now(); | |
| console.log([b-c,a-d,b,a].join(", "));d=a;c=b},!0)})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment