Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keep-out-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keep-out-polyfill - npm Package Compare versions

Comparing version 1.2.10 to 1.2.11

2

dist/keep-out-polyfill.esm.js

@@ -1,1 +0,1 @@

!function(){var i=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.dispatchResize=!1,this.keyHeight=0,this.clientY=0,this.init()};i.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},i.prototype.initOrientation=function(){var i=this;window.addEventListener("orientationchange",function(){i.winHeight=window.innerHeight,i.navHeight=screen.availHeight-i.winHeight,i.dispatchResize=!1})},i.prototype.isResize=function(){var i=window.innerHeight;return Math.abs(i-this.winHeight)>this.navHeight},i.prototype.getKeiHeight=function(){this.isKeepOut?this.keyHeight=screen.availHeight-window.innerHeight-50:this.keyHeight=window.innerHeight/2},i.prototype.onceComput=function(){this.dispatchResize||(this.dispatchResize=!0,null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()))},i.prototype.focusFn=function(){if(this.clientY>this.keyHeight&&(!1===this.isKeepOut||this.isbodyHide)){var i=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+i+"px)"}},i.prototype.blurFn=function(){document.body.style.transform="translateY(0px)"},i.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(i){var t=i||window.event;e.clientY=t.clientY}),window.addEventListener("keyboardFocus",function(){e.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),e.onceComput(),e.focusFn()})},i.prototype.initBlur=function(){var i=this;window.addEventListener("keyboardBlur",function(){i.blurFn()})},new i}();
!function(){var i=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.dispatchResize=!1,this.keyHeight=0,this.clientY=0,this.fnQuery=[],this.init()};i.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},i.prototype.initOrientation=function(){var i=this;window.addEventListener("orientationchange",function(){i.winHeight=window.innerHeight,i.navHeight=screen.availHeight-i.winHeight,i.dispatchResize=!1})},i.prototype.isResize=function(){var i=window.innerHeight;return Math.abs(i-this.winHeight)>this.navHeight},i.prototype.getKeiHeight=function(){this.isKeepOut?this.keyHeight=screen.availHeight-window.innerHeight-50:this.keyHeight=window.innerHeight/2},i.prototype.onceComput=function(){this.dispatchResize||(this.dispatchResize=!0,null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()))},i.prototype.focusFn=function(){if(this.clientY>this.keyHeight&&(!1===this.isKeepOut||this.isbodyHide)){var i=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+i+"px)"}},i.prototype.blurFn=function(){document.body.style.transform="translateY(0px)"},i.prototype.initFocus=function(){var n=this;window.addEventListener("click",function(i){var t=i||window.event;n.clientY=t.clientY;var e=n;n.fnQuery.length&&(n.fnQuery.forEach(function(i){i.call(e)}),n.fnQuery.length=0)}),window.addEventListener("keyboardFocus",function(){n.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),n.onceComput(),n.fnQuery.push(n.focusFn)})},i.prototype.initBlur=function(){var i=this;window.addEventListener("keyboardBlur",function(){i.blurFn()})},new i}();

@@ -1,1 +0,1 @@

!function(){"use strict";var i;(i=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.dispatchResize=!1,this.keyHeight=0,this.clientY=0,this.init()}).prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},i.prototype.initOrientation=function(){var i=this;window.addEventListener("orientationchange",function(){i.winHeight=window.innerHeight,i.navHeight=screen.availHeight-i.winHeight,i.dispatchResize=!1})},i.prototype.isResize=function(){var i=window.innerHeight;return Math.abs(i-this.winHeight)>this.navHeight},i.prototype.getKeiHeight=function(){this.isKeepOut?this.keyHeight=screen.availHeight-window.innerHeight-50:this.keyHeight=window.innerHeight/2},i.prototype.onceComput=function(){this.dispatchResize||(this.dispatchResize=!0,null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()))},i.prototype.focusFn=function(){if(this.clientY>this.keyHeight&&(!1===this.isKeepOut||this.isbodyHide)){var i=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+i+"px)"}},i.prototype.blurFn=function(){document.body.style.transform="translateY(0px)"},i.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(i){var t=i||window.event;e.clientY=t.clientY}),window.addEventListener("keyboardFocus",function(){e.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),e.onceComput(),e.focusFn()})},i.prototype.initBlur=function(){var i=this;window.addEventListener("keyboardBlur",function(){i.blurFn()})},new i}();
!function(){"use strict";var i;(i=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.dispatchResize=!1,this.keyHeight=0,this.clientY=0,this.fnQuery=[],this.init()}).prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},i.prototype.initOrientation=function(){var i=this;window.addEventListener("orientationchange",function(){i.winHeight=window.innerHeight,i.navHeight=screen.availHeight-i.winHeight,i.dispatchResize=!1})},i.prototype.isResize=function(){var i=window.innerHeight;return Math.abs(i-this.winHeight)>this.navHeight},i.prototype.getKeiHeight=function(){this.isKeepOut?this.keyHeight=screen.availHeight-window.innerHeight-50:this.keyHeight=window.innerHeight/2},i.prototype.onceComput=function(){this.dispatchResize||(this.dispatchResize=!0,null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()))},i.prototype.focusFn=function(){if(this.clientY>this.keyHeight&&(!1===this.isKeepOut||this.isbodyHide)){var i=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+i+"px)"}},i.prototype.blurFn=function(){document.body.style.transform="translateY(0px)"},i.prototype.initFocus=function(){var n=this;window.addEventListener("click",function(i){var t=i||window.event;n.clientY=t.clientY;var e=n;n.fnQuery.length&&(n.fnQuery.forEach(function(i){i.call(e)}),n.fnQuery.length=0)}),window.addEventListener("keyboardFocus",function(){n.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),n.onceComput(),n.fnQuery.push(n.focusFn)})},i.prototype.initBlur=function(){var i=this;window.addEventListener("keyboardBlur",function(){i.blurFn()})},new i}();

@@ -1,1 +0,1 @@

!function(i){"function"==typeof define&&define.amd?define(i):i()}(function(){"use strict";var i;(i=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.dispatchResize=!1,this.keyHeight=0,this.clientY=0,this.init()}).prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},i.prototype.initOrientation=function(){var i=this;window.addEventListener("orientationchange",function(){i.winHeight=window.innerHeight,i.navHeight=screen.availHeight-i.winHeight,i.dispatchResize=!1})},i.prototype.isResize=function(){var i=window.innerHeight;return Math.abs(i-this.winHeight)>this.navHeight},i.prototype.getKeiHeight=function(){this.isKeepOut?this.keyHeight=screen.availHeight-window.innerHeight-50:this.keyHeight=window.innerHeight/2},i.prototype.onceComput=function(){this.dispatchResize||(this.dispatchResize=!0,null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()))},i.prototype.focusFn=function(){if(this.clientY>this.keyHeight&&(!1===this.isKeepOut||this.isbodyHide)){var i=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+i+"px)"}},i.prototype.blurFn=function(){document.body.style.transform="translateY(0px)"},i.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(i){var t=i||window.event;e.clientY=t.clientY}),window.addEventListener("keyboardFocus",function(){e.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),e.onceComput(),e.focusFn()})},i.prototype.initBlur=function(){var i=this;window.addEventListener("keyboardBlur",function(){i.blurFn()})},new i});
!function(i){"function"==typeof define&&define.amd?define(i):i()}(function(){"use strict";var i;(i=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.dispatchResize=!1,this.keyHeight=0,this.clientY=0,this.fnQuery=[],this.init()}).prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},i.prototype.initOrientation=function(){var i=this;window.addEventListener("orientationchange",function(){i.winHeight=window.innerHeight,i.navHeight=screen.availHeight-i.winHeight,i.dispatchResize=!1})},i.prototype.isResize=function(){var i=window.innerHeight;return Math.abs(i-this.winHeight)>this.navHeight},i.prototype.getKeiHeight=function(){this.isKeepOut?this.keyHeight=screen.availHeight-window.innerHeight-50:this.keyHeight=window.innerHeight/2},i.prototype.onceComput=function(){this.dispatchResize||(this.dispatchResize=!0,null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()))},i.prototype.focusFn=function(){if(this.clientY>this.keyHeight&&(!1===this.isKeepOut||this.isbodyHide)){var i=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+i+"px)"}},i.prototype.blurFn=function(){document.body.style.transform="translateY(0px)"},i.prototype.initFocus=function(){var n=this;window.addEventListener("click",function(i){var t=i||window.event;n.clientY=t.clientY;var e=n;n.fnQuery.length&&(n.fnQuery.forEach(function(i){i.call(e)}),n.fnQuery.length=0)}),window.addEventListener("keyboardFocus",function(){n.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),n.onceComput(),n.fnQuery.push(n.focusFn)})},i.prototype.initBlur=function(){var i=this;window.addEventListener("keyboardBlur",function(){i.blurFn()})},new i});
{
"name": "keep-out-polyfill",
"version": "1.2.10",
"version": "1.2.11",
"main": "dist/keep-out-polyfill.umd.js",

@@ -5,0 +5,0 @@ "module": "dist/keep-out-polyfill.esm.js",

@@ -12,2 +12,3 @@ (function(){

this.clientY = 0
this.fnQuery = []
this.init()

@@ -75,2 +76,9 @@ }

this.clientY = event.clientY
let _this = this
if(this.fnQuery.length){
this.fnQuery.forEach(fn=>{
fn.call(_this)
})
this.fnQuery.length = 0
}
})

@@ -80,3 +88,3 @@ window.addEventListener('keyboardFocus', () => {

this.onceComput()
this.focusFn()
this.fnQuery.push(this.focusFn)
})

@@ -83,0 +91,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc