Skip to content

Instantly share code, notes, and snippets.

@azugxi7374
Created December 31, 2018 14:20
Show Gist options
  • Save azugxi7374/026ad6288878117512627913c4ff09a0 to your computer and use it in GitHub Desktop.
Save azugxi7374/026ad6288878117512627913c4ff09a0 to your computer and use it in GitHub Desktop.
javascript:!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e){const n=1e3,r=1e3;async function o(t,e){return t.setAttribute&&t.setAttribute("style",`transition-duration: ${e}ms;\n transform: translate(0px,1000px) rotate(0deg);`),await async function(t){return new Promise((e,n)=>{setTimeout(e,t)})}(e)}async function i(t,e){const u=Array.from(t.childNodes).map(t=>i(t,e));return await Promise.all(u).then(()=>e.schedule(()=>(async function(t){let e=!1,i=!1;if(t.getBoundingClientRect){const n=t.getBoundingClientRect();i=(e=n.height*n.width>=r)&&n.bottom>=0&&n.top<=window.innerHeight}return i&&await o(t,n),e&&t.parentNode&&t.parentNode.removeChild(t),null})(t)))}!async function(){const t=function(t,e){const n=[];let r=0;function o(){for(;n.length>0&&r<e;){const t=Math.floor(Math.random()*n.length),e=n[t];n.splice(t,1),r++,e(Promise.resolve()).then(()=>r--)}}return{start:function(){setInterval(o,t)},schedule:function(t){return new Promise((e,r)=>{n.push(n=>n.then(()=>t()).then(t=>e(t)))})}}}(100,50);t.start(),await i(document.body,t),console.log("ok")}()}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment