@uf-onbrand/onbrand-utility-functions-tv2
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("onbrandUtilityFunctions",[],e):"object"==typeof exports?exports.onbrandUtilityFunctions=e():t.onbrandUtilityFunctions=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";e.checkPageType=function(){return document.body.classList[0]},e.blockCTAFix=function(t){var e=document.getElementById("uf-gated-cta-wrapper"),o=getTopNavBuffer(t);if(e){var n=e.offsetHeight/2,i=document.getElementById("uf-item-container"),r=i.getBoundingClientRect().top+document.body.scrollTop,c=i.offsetTop+i.offsetHeight,s=window.innerHeight/2,a=window.pageYOffset+s;!function(t,e){for(var o in e)t.style[o]=e[o]}(e,a-n<r?{position:"absolute",top:"0",margin:"0",transform:"translate(-50%, "+o/3+"px)"}:a+n>c?{position:"absolute",margin:"0",top:c-e.offsetHeight-n+"px",transform:"translate(-50%, -50%)"}:{position:"fixed",transform:"translate(-50%, -50%)",top:"",marginTop:o/3+"px"})}},e.fadeOutItem=function(){var t=document.getElementById("uf-prev-next-items");if("uf-item-page"===checkPageType()&&document.getElementById("uf-prev-next-items").classList.contains("uf-next-item-flyout")&&t){var e=document.getElementById("injected-footer")?document.getElementById("injected-footer").offsetHeight:0,o=document.body.scrollHeight-window.innerHeight-(e+window.innerHeight),n=document.querySelector("#uf-prev-next-items.uf-next-item-flyout .uf-next-link"),i=Math.ceil(n.getBoundingClientRect().top);document.body.classList.contains("uf-has-cta-beside")?Math.ceil(document.getElementById("uf-cta-beside").getBoundingClientRect().bottom)>i||window.scrollY>o?n.style.opacity="0":n.style.opacity="1":window.scrollY>o?n.style.opacity="0":n.style.opacity="1"}},e.devMode=function(){console.log(" "),console.log(" "),console.warn("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"),console.warn(" Hey OnBrander, we're in dev mode!"),console.warn(" Info on the utility functions can be found here: https://obdocs.herokuapp.com/ob/tools/utility-functions-tv2.html"),console.warn("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"),console.log(" "),console.log(" ")},e.recoEnginePosition=function(t){var e=document.getElementById("uf-reco-panel");if(e)try{var o=t?document.querySelector(""+t):document.getElementById("injected-footer"),n=parseInt(e.style.top),i=Math.ceil(o.getBoundingClientRect().top)-n;e.style.height=i+"px"}catch(e){console.warn("recoEnginePositioning() has failed - the error thrown was:"),console.error(e),console.warn("The bottom target used was: "+t)}},e.getTopNavBuffer=function(t){var e=void 0;if(t)e=t;else{var o=document.getElementById("injected-header"),n=document.getElementById("uf-top-nav-container"),i=getComputedStyle(o).position,r=getComputedStyle(n).position;e=("fixed"===i||"sticky"===i?o.offsetHeight:0===o.height?document.querySelector("#injected-header > *").offsetHeight:0)+("fixed"===r||"sticky"===r?n.offsetHeight:0)}return e},e.sideCtaFix=function(t){var e=getTopNavBuffer(t),o=document.getElementById("uf-cta-beside");if(window.innerWidth>1351&&o){var n=o.childNodes[1],i=n.offsetHeight,r=document.getElementById("main-content"),c=r.offsetHeight,s=Math.ceil(r.getBoundingClientRect().top),a=Math.ceil(r.getBoundingClientRect().bottom);document.getElementById("uf-article").style.position="static",n.style.position="static",s-e<=0&&(n.style.position="fixed",n.style.top=e+"px"),a<=i+e&&(n.style.position="relative",n.style.top=c-i+"px")}else window.innerWidth<1351&&o&&o.childNodes[1].removeAttribute("style")},e.addThisFix=function(t){var e=getTopNavBuffer(t);if(window.innerWidth>980){var o=window.scrollY,n=document.querySelector("#at4-share");if(n){var i=n.offsetHeight,r=window.innerHeight/2,c=document.querySelector(".uf-main-content"),s=c.getBoundingClientRect().top+o,a=c.getBoundingClientRect().top+o+c.offsetHeight;n.setAttribute("style","top: "+(s-o)+"px !important;"),o+e>s&&o+e+i<a&&n.setAttribute("style","top: "+(e+r)+"px !important"),o+e+i>a&&n.setAttribute("style","top: "+(a-i-o)+"px !important")}}},e.checkStreamID=function(t){return Number(document.body.dataset.streamId)===t},e.streamTraverse=function(t,e,o){var n=!1,i=t.map(String);return console.log(i),e&&o?i.forEach(function(t){document.body.dataset.sourceStreamId===t&&(n=!0)}):e&&!o?i.forEach(function(t){document.body.dataset.streamId===t&&(n=!0)}):document.body.classList.contains("uf-stream-page")&&i.forEach(function(t){document.body.dataset.streamId===t&&(n=!0)}),n},e.streamCustomization=function(t,e){t.map(String).forEach(function(t){document.body.dataset.streamId===t&&e()})},e.createElem=function(t,e,o){var n=document.createElement(t);return void 0!==e&&Object.keys(e).forEach(function(t){n.setAttribute(t,e[t])}),void 0!==o&&(n.innerHTML=o),n}}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("onbrandUtilityFunctions",[],e):"object"==typeof exports?exports.onbrandUtilityFunctions=e():t.onbrandUtilityFunctions=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,o,n){"use strict";o.checkPageType=function(){return document.body.classList[0]},o.blockCTAFix=function(t){var e=document.getElementById("uf-gated-cta-wrapper"),o=getTopNavBuffer(t);if(e){var n=e.offsetHeight/2,i=document.getElementById("uf-item-container"),r=i.getBoundingClientRect().top+document.body.scrollTop,c=i.offsetTop+i.offsetHeight,s=window.innerHeight/2,a=window.pageYOffset+s;!function(t,e){for(var o in e)t.style[o]=e[o]}(e,a-n<r?{position:"absolute",top:"0",margin:"0",transform:"translate(-50%, "+o/3+"px)"}:a+n>c?{position:"absolute",margin:"0",top:c-e.offsetHeight-n+"px",transform:"translate(-50%, -50%)"}:{position:"fixed",transform:"translate(-50%, -50%)",top:"",marginTop:o/3+"px"})}},o.fadeOutItem=function(){var t=document.getElementById("uf-prev-next-items");if("uf-item-page"===checkPageType()&&document.getElementById("uf-prev-next-items").classList.contains("uf-next-item-flyout")&&t){var e=document.getElementById("injected-footer")?document.getElementById("injected-footer").offsetHeight:0,o=document.body.scrollHeight-window.innerHeight-(e+window.innerHeight),n=document.querySelector("#uf-prev-next-items.uf-next-item-flyout .uf-next-link"),i=Math.ceil(n.getBoundingClientRect().top);document.body.classList.contains("uf-has-cta-beside")?Math.ceil(document.getElementById("uf-cta-beside").getBoundingClientRect().bottom)>i||window.scrollY>o?n.style.opacity="0":n.style.opacity="1":window.scrollY>o?n.style.opacity="0":n.style.opacity="1"}},o.devMode=function(){console.log(" "),console.log(" "),console.warn("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"),console.warn(" Hey OnBrander, we're in dev mode!"),console.warn(" Info on the utility functions can be found here: https://obdocs.herokuapp.com/ob/tools/utility-functions-tv2.html"),console.warn("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"),console.log(" "),console.log(" ")},o.recoEnginePosition=function(t){var e=document.getElementById("uf-reco-panel");if(e)try{var o=t?document.querySelector(""+t):document.getElementById("injected-footer"),n=parseInt(e.style.top),i=Math.ceil(o.getBoundingClientRect().top)-n;e.style.height=i+"px"}catch(e){console.warn("recoEnginePositioning() has failed - the error thrown was:"),console.error(e),console.warn("The bottom target used was: "+t)}},o.getTopNavBuffer=function(t){var e=void 0;if(t)e=t;else{var o=document.getElementById("injected-header"),n=document.getElementById("uf-top-nav-container"),i=getComputedStyle(o).position,r=getComputedStyle(n).position;e=("fixed"===i||"sticky"===i?o.offsetHeight:0===o.height?document.querySelector("#injected-header > *").offsetHeight:0)+("fixed"===r||"sticky"===r?n.offsetHeight:0)}return e},o.sideCtaFix=function(t){var o=e.getTopNavBuffer(t),n=document.getElementById("uf-cta-beside");if(window.innerWidth>1351&&n){var i=n.childNodes[1],r=i.offsetHeight,c=document.getElementById("main-content"),s=c.offsetHeight,a=Math.ceil(c.getBoundingClientRect().top),u=Math.ceil(c.getBoundingClientRect().bottom);document.getElementById("uf-article").style.position="static",i.style.position="static",a-o<=0&&(i.style.position="fixed",i.style.top=o+"px"),u<=r+o&&(i.style.position="relative",i.style.top=s-r+"px")}else window.innerWidth<1351&&n&&n.childNodes[1].removeAttribute("style")},o.addThisFix=function(t){var e=getTopNavBuffer(t);if(window.innerWidth>980){var o=window.scrollY,n=document.querySelector("#at4-share");if(n){var i=n.offsetHeight,r=window.innerHeight/2,c=document.querySelector(".uf-main-content"),s=c.getBoundingClientRect().top+o,a=c.getBoundingClientRect().top+o+c.offsetHeight;n.setAttribute("style","top: "+(s-o)+"px !important;"),o+e>s&&o+e+i<a&&n.setAttribute("style","top: "+(e+r)+"px !important"),o+e+i>a&&n.setAttribute("style","top: "+(a-i-o)+"px !important")}}},o.checkStreamID=function(t){return Number(document.body.dataset.streamId)===t},o.streamTraverse=function(t,e,o){var n=!1,i=t.map(String);return console.log(i),e&&o?i.forEach(function(t){document.body.dataset.sourceStreamId===t&&(n=!0)}):e&&!o?i.forEach(function(t){document.body.dataset.streamId===t&&(n=!0)}):document.body.classList.contains("uf-stream-page")&&i.forEach(function(t){document.body.dataset.streamId===t&&(n=!0)}),n},o.streamCustomization=function(t,e){t.map(String).forEach(function(t){document.body.dataset.streamId===t&&e()})},o.createElem=function(t,e,o){var n=document.createElement(t);return void 0!==e&&Object.keys(e).forEach(function(t){n.setAttribute(t,e[t])}),void 0!==o&&(n.innerHTML=o),n}}])}); | ||
//# sourceMappingURL=onbrandUtilityFunctions.bundle.js.map |
{ | ||
"name": "@uf-onbrand/onbrand-utility-functions-tv2", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "A collection of useful reusable functions for working with uberflip TV2 hubs, to be included on an as-needed basis.", | ||
@@ -5,0 +5,0 @@ "main": "build/onbrandUtilityFunctions.bundle.js", |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
559279
0