This file contains 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
(function ScrollPolyfill() { | |
// The asynchronous tester | |
// wrapped in an iframe (will not work in SO's StackSnippet®) | |
var iframe = document.createElement('iframe'); | |
iframe.onload = function() { | |
var win = iframe.contentWindow; | |
// listen for a scroll event | |
win.addEventListener('scroll', function handler(e){ |
This file contains 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
open -a Google\ Chrome --args --disable-web-security --user-data-dir |
This file contains 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
const mergeArray = (arr1, arr2) => { | |
let arr = [...arr1, ...arr2] | |
const uniqueArr = arr | |
.map(e => e.id) | |
.map((e, i, keysArr) => keysArr.indexOf(e) === i && i) | |
.filter(e => arr[e]).map(e => arr[e]); | |
return uniqueArr; | |