sync
authorAlan Knowles <alan@roojs.com>
Tue, 17 Mar 2020 06:30:02 +0000 (14:30 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 17 Mar 2020 06:30:02 +0000 (14:30 +0800)
domains/businesssandesh.in.js [changed from symlink to file mode: 0644]

deleted file mode 120000 (symlink)
index 33889a8c59883fe64054b2dc370704105d67ecda..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-scroll_whole_page.js
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..ed6a756270548d469414eebd83437deee41087c6
--- /dev/null
@@ -0,0 +1,17 @@
+(function() {
+    var  scrollTo = function(duration) {
+        var to  = document.body.parentNode.scrollHeight;
+        if (duration <= 0) return;
+        var difference = to - document.body.parentNode.scrollTop;
+        var perTick = difference / duration * 10;
+    
+        var sid = setInterval(function() {
+            document.body.parentNode.scrollTop = document.body.parentNode.scrollTop + perTick;
+            if (document.body.parentNode.scrollTop > to) {
+                clearInterval(sid );
+            }
+            
+        }, 10);
+    }
+    scrollTo(1000);
+})()
\ No newline at end of file