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

@uf-onbrand/onbrand-utility-functions-tv2

Package Overview
Dependencies
Maintainers
8
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uf-onbrand/onbrand-utility-functions-tv2 - npm Package Compare versions

Comparing version 1.0.27 to 1.0.28

2

build/onbrandUtilityFunctions.bundle.js

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("onbrandUtilityFunctions",[],t):"object"==typeof exports?exports.onbrandUtilityFunctions=t():e.onbrandUtilityFunctions=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";e.exports=function(e,t){for(var n="",o=0;o<t.length;o++){var r=e.toLowerCase().split(",");if(new RegExp(t[o],"gi").test(r)){n=t[o];break}}return n}},function(e,t,n){"use strict";t.checkPageType=function(){return document.body.classList[0]},t.blockCTAFix=function(e){var t=document.getElementById("uf-gated-cta-wrapper"),n=this.getTopNavBuffer(e);if(t){var o=t.offsetHeight/2,r=document.getElementById("main-content"),i=r.getBoundingClientRect().top+document.body.scrollTop,a=r.offsetTop+r.offsetHeight,c=window.innerHeight/2,s=window.pageYOffset+c;!function(e,t){for(var n in t)e.style[n]=t[n]}(t,s-o<i?{position:"absolute",top:"0",margin:"0",transform:"translate(-50%, "+n/3+"px)"}:s+o>a?{position:"absolute",margin:"0",top:"auto",bottom:0,transform:"translate(-50%, 0)"}:{position:"fixed",transform:"translate(-50%, -50%)",top:"auto"})}},t.fadeOutItem=function(){var e=document.getElementById("uf-prev-next-items");if(e&&"uf-item-page"===this.checkPageType()&&e.classList.contains("uf-next-item-flyout")&&e&&window.innerWidth>1337){var t=document.getElementById("injected-footer")?document.getElementById("injected-footer").offsetHeight:0,n=document.body.scrollHeight-window.innerHeight-(t+window.innerHeight),o=document.querySelector("#uf-prev-next-items.uf-next-item-flyout .uf-next-link");if(!o)return;var r=Math.ceil(o.getBoundingClientRect().top);document.body.classList.contains("uf-has-cta-beside")?Math.ceil(document.getElementById("uf-cta-beside").getBoundingClientRect().bottom)>r||window.scrollY>n?o.style.opacity="0":o.style.opacity="1":window.scrollY>n?o.style.opacity="0":o.style.opacity="1"}},t.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(" ")},t.recoEnginePosition=function(e){var t=document.getElementById("uf-reco-panel");if(t)try{var n=e?document.querySelector(""+e):document.getElementById("injected-footer"),o=parseInt(t.style.top),r=Math.ceil(n.getBoundingClientRect().top)-o;t.style.height=r+"px"}catch(t){console.warn("recoEnginePositioning() has failed - the error thrown was:"),console.error(t),console.warn("The bottom target used was: "+e)}},t.getTopNavBuffer=function(e){var t=void 0;if(e)t=e;else{var n=document.getElementById("injected-header"),o=document.getElementById("uf-top-nav-container");if(!n||!o)return;var r=getComputedStyle(n).position,i=getComputedStyle(o).position;t=("fixed"===r||"sticky"===r?n.offsetHeight:0===n.height?document.querySelector("#injected-header > *").offsetHeight:0)+("fixed"===i||"sticky"===i?o.offsetHeight:0)}return t},t.sideCtaFix=function(e){var t=this.getTopNavBuffer(e),n=document.getElementById("uf-cta-beside");if(window.innerWidth>1351&&n){var o=n.childNodes[1],r=o.offsetHeight,i=document.getElementById("main-content"),a=i.offsetHeight,c=Math.ceil(i.getBoundingClientRect().top),s=Math.ceil(i.getBoundingClientRect().bottom);document.getElementById("uf-article").style.position="static",o.style.position="static",c-t<=0&&(o.style.position="fixed",o.style.top=t+"px"),s<=r+t&&(o.style.position="relative",o.style.top=a-r+"px")}else window.innerWidth<1351&&n&&n.childNodes[1].removeAttribute("style")},t.addThisFix=function(e){var t=this.getTopNavBuffer(e);if(window.innerWidth>980){var n=window.scrollY,o=document.querySelector("#at4-share");if(o){var r=o.offsetHeight,i=window.innerHeight/2,a=document.querySelector(".uf-main-content"),c=a.getBoundingClientRect().top+n,s=a.getBoundingClientRect().top+n+a.offsetHeight;o.setAttribute("style","top: "+(c-n)+"px !important;"),n+t>c&&n+t+r<s&&o.setAttribute("style","top: "+(t+i)+"px !important"),n+t+r>s&&o.setAttribute("style","top: "+(s-r-n)+"px !important")}}},t.checkStreamID=function(e){return Number(document.body.dataset.streamId)===e},t.streamTraverse=function(e,t,n){var o=!1,r=e.map(String);return t&&n?r.forEach(function(e){document.body.dataset.sourceStreamId===e&&(o=!0)}):t&&!n?r.forEach(function(e){document.body.dataset.streamId===e&&(o=!0)}):document.body.classList.contains("uf-stream-page")&&r.forEach(function(e){document.body.dataset.streamId===e&&(o=!0)}),o},t.streamCustomization=function(e,t){e.map(String).forEach(function(e){document.body.dataset.streamId===e&&t()})},t.createElem=function(e,t,n){var o=document.createElement(e);return void 0!==t&&Object.keys(t).forEach(function(e){o.setAttribute(e,t[e])}),void 0!==n&&(o.innerHTML=n),o},t.replaceHTMLElements=function(){var e=window.replaceHTML;e&&Object.keys(e).forEach(function(t){if("showcode"==t.toLowerCase())!0===e[t]&&console.log("%cCOPY & PASTE THE FOLLOWING CODE INTO THE CODEBLOCK:","font-size: 20px; background-color: #d9e6d0;",'\n\n function toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var replaceHTML = function replaceHTML(elementContainer, element, newElementTag) {\n var elementClass = arguments.length <= 3 || arguments[3] === undefined ? "" : arguments[3];\n var targetElement = [].concat(toConsumableArray(document.querySelectorAll(elementContainer + " " + element)));\n if (targetElement) {\n targetElement.forEach(function (element) {\n var newElement = document.createElement(newElementTag);\n newElement.innerHTML = element.innerHTML;\n element.classList ? newElement.classList = element.classList : null;\n element.id ? newElement.id = element.id : null;\n elementClass ? newElement.classList.add(elementClass) : null;\n element.replaceWith(newElement);\n });\n }\n }; \n // REPLACE ARGS BELOW v\n replaceHTML(elementContainer, element, newElementTag, elementClass)');else{var n=t,o=e[t].parentElement,r=e[t].newElement,i=e[t].optionalClass,a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(document.querySelectorAll(o+" "+n)));a&&a.forEach(function(e){var t=document.createElement(r);t.innerHTML=e.innerHTML,e.classList&&(t.classList=e.classList),e.id&&(t.id=e.id),i&&t.classList.add(i),e.replaceWith(t)})}})},t.__EXPERIMENTAL__getMatchingTag=n(0)}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("onbrandUtilityFunctions",[],t):"object"==typeof exports?exports.onbrandUtilityFunctions=t():e.onbrandUtilityFunctions=t()}(window,function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";e.exports=function(e,t){for(var n="",o=0;o<t.length;o++){var r=e.toLowerCase().split(",");if(new RegExp(t[o],"gi").test(r)){n=t[o];break}}return n}},function(e,t,n){"use strict";t.checkPageType=function(){return document.body.classList[0]},t.blockCTAFix=function(e){var t=document.getElementById("uf-gated-cta-wrapper"),n=this.getTopNavBuffer(e);if(t){var o=t.offsetHeight/2,r=document.getElementById("main-content"),i=r.getBoundingClientRect().top+document.body.scrollTop,a=r.offsetTop+r.offsetHeight,c=window.innerHeight/2,s=window.pageYOffset+c;!function(e,t){for(var n in t)e.style[n]=t[n]}(t,s-o<i?{position:"absolute",top:"0",margin:"0",transform:"translate(-50%, "+n/3+"px)"}:s+o>a?{position:"absolute",margin:"0",top:"auto",bottom:0,transform:"translate(-50%, 0)"}:{position:"fixed",transform:"translate(-50%, -50%)",top:"auto"})}},t.fadeOutItem=function(){var e=document.getElementById("uf-prev-next-items");if(e&&"uf-item-page"===this.checkPageType()&&e.classList.contains("uf-next-item-flyout")&&e&&window.innerWidth>1337){var t=document.getElementById("injected-footer")?document.getElementById("injected-footer").offsetHeight:0,n=document.body.scrollHeight-window.innerHeight-(t+window.innerHeight),o=document.querySelector("#uf-prev-next-items.uf-next-item-flyout .uf-next-link");if(!o)return;var r=Math.ceil(o.getBoundingClientRect().top);document.body.classList.contains("uf-has-cta-beside")?Math.ceil(document.getElementById("uf-cta-beside").getBoundingClientRect().bottom)>r||window.scrollY>n?o.style.opacity="0":o.style.opacity="1":window.scrollY>n?o.style.opacity="0":o.style.opacity="1"}},t.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(" ")},t.recoEnginePosition=function(e){var t=document.getElementById("uf-reco-panel");if(t)try{var n=e?document.querySelector(""+e):document.getElementById("injected-footer"),o=parseInt(t.style.top),r=Math.ceil(n.getBoundingClientRect().top)-o;t.style.height=r+"px"}catch(t){console.warn("recoEnginePositioning() has failed - the error thrown was:"),console.error(t),console.warn("The bottom target used was: "+e)}},t.getTopNavBuffer=function(e){var t=void 0;if(e)t=e;else{var n=document.getElementById("injected-header"),o=document.getElementById("uf-top-nav-container");if(!n||!o)return;var r=getComputedStyle(n).position,i=getComputedStyle(o).position;t=("fixed"===r||"sticky"===r?n.offsetHeight:0===n.height?document.querySelector("#injected-header > *").offsetHeight:0)+("fixed"===i||"sticky"===i?o.offsetHeight:0)}return t},t.sideCtaFix=function(e){var t=this.getTopNavBuffer(e),n=document.getElementById("uf-cta-beside");if(window.innerWidth>1351&&n){var o=n.childNodes[1],r=o.offsetHeight,i=document.getElementById("main-content"),a=i.offsetHeight,c=Math.ceil(i.getBoundingClientRect().top),s=Math.ceil(i.getBoundingClientRect().bottom);document.getElementById("uf-article").style.position="static",o.style.position="static",c-t<=0&&(o.style.position="fixed",o.style.top=t+"px"),s<=r+t&&(o.style.position="relative",o.style.top=a-r+"px")}else window.innerWidth<1351&&n&&n.childNodes[1].removeAttribute("style")},t.addThisFix=function(e){var t=this.getTopNavBuffer(e);if(window.innerWidth>980){var n=window.scrollY,o=document.querySelector("#at4-share");if(o){var r=o.offsetHeight,i=window.innerHeight/2,a=document.querySelector(".uf-main-content"),c=a.getBoundingClientRect().top+n,s=a.getBoundingClientRect().top+n+a.offsetHeight;o.setAttribute("style","top: "+(c-n)+"px !important;"),n+t>c&&n+t+r<s&&o.setAttribute("style","top: "+(t+i)+"px !important"),n+t+r>s&&o.setAttribute("style","top: "+(s-r-n)+"px !important")}}},t.checkStreamID=function(e){return Number(document.body.dataset.streamId)===e},t.streamTraverse=function(e,t,n){var o=!1,r=e.map(String);return t&&n?r.forEach(function(e){document.body.dataset.sourceStreamId===e&&(o=!0)}):t&&!n?r.forEach(function(e){document.body.dataset.streamId===e&&(o=!0)}):document.body.classList.contains("uf-stream-page")&&r.forEach(function(e){document.body.dataset.streamId===e&&(o=!0)}),o},t.streamCustomization=function(e,t){e.map(String).forEach(function(e){document.body.dataset.streamId===e&&t()})},t.createElem=function(e,t,n){var o=document.createElement(e);return void 0!==t&&Object.keys(t).forEach(function(e){o.setAttribute(e,t[e])}),void 0!==n&&(o.innerHTML=n),o},t.replaceHTMLElements=function(){var e=window.replaceHTML;e&&Object.keys(e).forEach(function(t){if("showcode"==t.toLowerCase())!0===e[t]&&console.log("%cCOPY & PASTE THE FOLLOWING CODE INTO THE CODEBLOCK:","font-size: 20px; background-color: #d9e6d0;",'\n\n function toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var replaceHTML = function replaceHTML(elementContainer, element, newElementTag) {\n var elementClass = arguments.length <= 3 || arguments[3] === undefined ? "" : arguments[3];\n var targetElement = [].concat(toConsumableArray(document.querySelectorAll(elementContainer + " " + element)));\n if (targetElement) {\n targetElement.forEach(function (element) {\n var newElement = document.createElement(newElementTag);\n newElement.innerHTML = element.innerHTML;\n element.classList ? newElement.classList = element.classList : null;\n element.id ? newElement.id = element.id : null;\n elementClass ? newElement.classList.add(elementClass) : null;\n element.replaceWith(newElement);\n });\n }\n }; \n // REPLACE ARGS BELOW v\n replaceHTML(elementContainer, element, newElementTag, elementClass);');else{var n=t,o=e[t].parentElement,r=e[t].newElement,i=e[t].optionalClass,a=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(document.querySelectorAll(o+" "+n)));a&&a.forEach(function(e){var t=document.createElement(r);t.innerHTML=e.innerHTML,e.classList&&(t.classList=e.classList),e.id&&(t.id=e.id),i&&t.classList.add(i),e.replaceWith(t)})}})},t.__EXPERIMENTAL__getMatchingTag=n(0)}])});
//# sourceMappingURL=onbrandUtilityFunctions.bundle.js.map
{
"name": "@uf-onbrand/onbrand-utility-functions-tv2",
"version": "1.0.27",
"version": "1.0.28",
"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

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