YouTube - Version 13.4.2

Version Description

Download this release

Release Info

Developer embedplus
Plugin Icon 128x128 YouTube
Version 13.4.2
Comparing to
See all releases

Code changes from version 13.4.1.2 to 13.4.2

dist/blocks.build.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){var o=n(9),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},function(e,t,n){var o=n(1),r=o.Symbol;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(4)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(5),a=(n.n(l),n(6)),c=(n.n(a),n(7)),s=n.n(c),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),__=wp.i18n.__,p=wp.blocks.registerBlockType,m=wp.element,f=m.Component,d=m.Fragment,w=wp.components,v=w.ServerSideRender,y=w.Button,b=w.Modal;p("epyt/youtube",{title:__("YouTube Wizard"),icon:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),category:"embed",keywords:[__("gallery"),__("live"),__("video")],description:__("Embed a video, playlist, channel, gallery, or live stream."),attributes:{shortcode:{type:"string",default:""}},edit:function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return n.state={show:!1},n.showModal=function(){n.setState({show:!0})},n.hideModal=function(){n.setState({show:!1})},n.onMessage=function(e){try{if(0===e.data.indexOf("youtubeembedplus")&&e.data.indexOf(n.props.clientId)>0){var t="";t=e.data.split("|")[1],n.props.setAttributes({shortcode:t.toString()}),n.hideModal(),n.gbPreviewSetup("onMessage")}}catch(e){}},n.gbPreviewSetup=s()(function(e){setTimeout(function(){window._EPYTA_.gbPreviewSetup()},1500)},50),n.props=e,n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage),this.gbPreviewSetup("componentDidMount")}},{key:"componentDidUpdate",value:function(){this.gbPreviewSetup("componentDidUpdate")}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onMessage)}},{key:"render",value:function(){if(this.props.attributes.shortcode){return wp.element.createElement(v,{block:"epyt/youtube",attributes:this.props.attributes})}return wp.element.createElement("div",{className:"components-placeholder editor-media-placeholder wp-block-image epytblock"},wp.element.createElement("div",{className:"components-placeholder__label"},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69",width:"20",height:"20",className:"dashicon"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),"YouTube Wizard"),wp.element.createElement("div",{className:this.props.isSelected?"":"epytblock__faded--off"},wp.element.createElement("div",{className:"components-placeholder__instructions"},"Click the button below to easily embed a video, playlist, channel, gallery, or live stream."),wp.element.createElement("div",{className:"components-placeholder__fieldset"},wp.element.createElement("div",null,wp.element.createElement(y,{isDefault:!0,isLarge:!0,onClick:this.showModal},"Open Wizard"),this.state.show?wp.element.createElement(b,{title:"YouTube Wizard",className:"epytblock epytblock__modal",onRequestClose:this.hideModal,shouldCloseOnClickOutside:!1},wp.element.createElement("iframe",{title:"YouTube Wizard",src:window._EPYTA_.wizhref+"&clientId="+this.props.clientId})):null))))}}]),t}(f),save:function(e){return wp.element.createElement(d,null,e.attributes.shortcode)}})},function(e,t){},function(e,t){},function(e,t,n){function o(e,t,n){function o(t){var n=b,o=h;return b=h=void 0,O=t,E=e.apply(o,n)}function u(e){return O=e,_=setTimeout(f,t),j?o(e):E}function p(e){var n=e-x,o=e-O,r=t-n;return M?s(r,g-o):r}function m(e){var n=e-x,o=e-O;return void 0===x||n>=t||n<0||M&&o>=g}function f(){var e=i();if(m(e))return d(e);_=setTimeout(f,p(e))}function d(e){return _=void 0,T&&b?o(e):(b=h=void 0,E)}function w(){void 0!==_&&clearTimeout(_),O=0,b=x=h=_=void 0}function v(){return void 0===_?E:d(i())}function y(){var e=i(),n=m(e);if(b=arguments,h=this,x=e,n){if(void 0===_)return u(x);if(M)return clearTimeout(_),_=setTimeout(f,t),o(x)}return void 0===_&&(_=setTimeout(f,t)),E}var b,h,g,E,_,x,O=0,j=!1,M=!1,T=!0;if("function"!=typeof e)throw new TypeError(a);return t=l(t)||0,r(n)&&(j=!!n.leading,M="maxWait"in n,g=M?c(l(n.maxWait)||0,t):g,T="trailing"in n?!!n.trailing:T),y.cancel=w,y.flush=v,y}var r=n(0),i=n(8),l=n(11),a="Expected a function",c=Math.max,s=Math.min;e.exports=o},function(e,t,n){var o=n(1),r=function(){return o.Date.now()};e.exports=r},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(10))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){function o(e){if("number"==typeof e)return e;if(i(e))return l;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||u.test(e)?p(e.slice(2),n?2:8):c.test(e)?l:+e}var r=n(0),i=n(12),l=NaN,a=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,p=parseInt;e.exports=o},function(e,t,n){function o(e){return"symbol"==typeof e||i(e)&&r(e)==l}var r=n(13),i=n(16),l="[object Symbol]";e.exports=o},function(e,t,n){function o(e){return null==e?void 0===e?c:a:s&&s in Object(e)?i(e):l(e)}var r=n(2),i=n(14),l=n(15),a="[object Null]",c="[object Undefined]",s=r?r.toStringTag:void 0;e.exports=o},function(e,t,n){function o(e){var t=l.call(e,c),n=e[c];try{e[c]=void 0;var o=!0}catch(e){}var r=a.call(e);return o&&(t?e[c]=n:delete e[c]),r}var r=n(2),i=Object.prototype,l=i.hasOwnProperty,a=i.toString,c=r?r.toStringTag:void 0;e.exports=o},function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n}]);
1
+ !function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=3)}([function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){var o=n(9),r="object"==typeof self&&self&&self.Object===Object&&self,i=o||r||Function("return this")();e.exports=i},function(e,t,n){var o=n(1),r=o.Symbol;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(4)},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(5),a=(n.n(l),n(6)),c=(n.n(a),n(7)),s=n.n(c),u=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),__=wp.i18n.__,p=wp.blocks.registerBlockType,m=wp.element,f=m.Component,d=m.Fragment,w=wp.components,v=w.Button,y=w.Modal,b=wp,h=b.serverSideRender;p("epyt/youtube",{title:__("YouTube Wizard"),icon:wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),category:"embed",keywords:[__("gallery"),__("live"),__("video")],description:__("Embed a video, playlist, channel, gallery, or live stream."),attributes:{shortcode:{type:"string",default:""}},edit:function(e){function t(e){o(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments));return n.state={show:!1},n.showModal=function(){n.setState({show:!0})},n.hideModal=function(){n.setState({show:!1})},n.onMessage=function(e){try{if(0===e.data.indexOf("youtubeembedplus")&&e.data.indexOf(n.props.clientId)>0){var t="";t=e.data.split("|")[1],n.props.setAttributes({shortcode:t.toString()}),n.hideModal(),n.gbPreviewSetup("onMessage")}}catch(e){}},n.gbPreviewSetup=s()(function(e){setTimeout(function(){window._EPYTA_.gbPreviewSetup()},1500)},50),n.props=e,n}return i(t,e),u(t,[{key:"componentDidMount",value:function(){window.addEventListener("message",this.onMessage),this.gbPreviewSetup("componentDidMount")}},{key:"componentDidUpdate",value:function(){this.gbPreviewSetup("componentDidUpdate")}},{key:"componentWillUnmount",value:function(){window.removeEventListener("message",this.onMessage)}},{key:"render",value:function(){if(this.props.attributes.shortcode){return wp.element.createElement(h,{block:"epyt/youtube",attributes:this.props.attributes})}return wp.element.createElement("div",{className:"components-placeholder is-large editor-media-placeholder wp-block-image epytblock"},wp.element.createElement("div",{className:"components-placeholder__label"},wp.element.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 292.89 282.69",width:"20",height:"20",className:"dashicon"},wp.element.createElement("title",null,"YouTube Wizard Icon"),wp.element.createElement("g",{id:"Layer_2","data-name":"Layer 2"},wp.element.createElement("g",{id:"\u0421\u043b\u043e\u0439_1","data-name":"\u0421\u043b\u043e\u0439 1"},wp.element.createElement("g",{id:"g5360"},wp.element.createElement("g",{id:"g4167"},wp.element.createElement("path",{id:"path4156",className:"epytcls-1",d:"M139.27,87.65s-87.11,0-109,5.68A36,36,0,0,0,5.68,118.12C0,140,0,185.26,0,185.26s0,45.44,5.68,67A35.47,35.47,0,0,0,30.3,276.84c22,5.85,109,5.85,109,5.85s87.28,0,109.14-5.68a34.64,34.64,0,0,0,24.44-24.62c5.86-21.69,5.86-67,5.86-67s.17-45.45-5.86-67.31a34.41,34.41,0,0,0-24.44-24.45C226.55,87.65,139.27,87.65,139.27,87.65Zm-27.72,55.77L184,185.26l-72.48,41.65V143.42Z"}))),wp.element.createElement("path",{className:"epytcls-2",d:"M143.39,153.45c10.52-19.27,14.91-39.2,19.18-58.61q.68-3,1.33-6l.12-.54-.25-.48c-13.87-26.66-41.06-52.54-57.1-66.42,21,11.33,60,31.21,84,36.13l.63.13.53-.37c4.14-2.92,8.28-5.7,12.28-8.4,13.41-9,26.27-17.67,38.31-30.64-10.26,20.67-14.18,40.47-18.14,64.42l-.09.58.32.48c18.19,27.91,40.93,50.88,54.81,63.7C261.68,137.5,230,121.76,197,115.29l-.57-.12-3.83,2.35C176,127.67,159,138.08,143.39,153.45Z"}),wp.element.createElement("path",{className:"epytcls-3",d:"M237.47,25.4c-7.73,18.08-11.19,36-14.67,57l-.19,1.15.64,1c15,23,33.15,42.76,46.87,56.19-18.4-9.59-45.13-21.49-72.87-26.93l-1.15-.22-1,.61-3.33,2c-14.47,8.86-29.26,17.93-43.24,30.34,7.94-17,11.77-34.43,15.51-51.43q.66-3,1.33-6l.24-1.06-.51-1c-11.66-22.4-32.12-43.86-48-58.48C139,40,170,54.82,190.37,59l1.27.26,1.06-.74c4.12-2.91,8.25-5.69,12.25-8.38,11.27-7.59,22.16-14.91,32.52-24.74M254.86,0l-.74,1.11L254.86,0Zm-.74,1.11C235.26,28.88,213.71,40,191,56.06c-33.55-6.88-97.91-43.92-97.91-43.92s49,37.13,69.38,76.37c-6,26.61-11,54.9-31.35,80.94,19.83-25.28,42.66-38.61,65.58-52.69,50.06,9.8,96.22,40.55,96.22,40.55s-38.84-31-67.13-74.4c4.89-29.58,9.81-54,28.36-81.8Z"}),wp.element.createElement("polyline",{className:"epytcls-4",points:"102.6 133.11 102.6 133.11 192.98 185.28 102.6 237.22 102.6 133.11"})))),"YouTube Wizard"),wp.element.createElement("div",{className:this.props.isSelected?"":"epytblock__faded--off"},wp.element.createElement("div",{className:"components-placeholder__instructions"},"Click the button below to easily embed a video, playlist, channel, gallery, or live stream."),wp.element.createElement("div",{className:"components-placeholder__fieldset"},wp.element.createElement("div",null,wp.element.createElement(v,{isPrimary:!0,onClick:this.showModal},"Open Wizard"),this.state.show?wp.element.createElement(y,{title:"YouTube Wizard",className:"epytblock epytblock__modal",onRequestClose:this.hideModal,shouldCloseOnClickOutside:!1},wp.element.createElement("iframe",{title:"YouTube Wizard",src:window._EPYTA_.wizhref+"&clientId="+this.props.clientId})):null))))}}]),t}(f),save:function(e){return wp.element.createElement(d,null,e.attributes.shortcode)}})},function(e,t){},function(e,t){},function(e,t,n){function o(e,t,n){function o(t){var n=b,o=h;return b=h=void 0,O=t,E=e.apply(o,n)}function u(e){return O=e,_=setTimeout(f,t),j?o(e):E}function p(e){var n=e-x,o=e-O,r=t-n;return M?s(r,g-o):r}function m(e){var n=e-x,o=e-O;return void 0===x||n>=t||n<0||M&&o>=g}function f(){var e=i();if(m(e))return d(e);_=setTimeout(f,p(e))}function d(e){return _=void 0,T&&b?o(e):(b=h=void 0,E)}function w(){void 0!==_&&clearTimeout(_),O=0,b=x=h=_=void 0}function v(){return void 0===_?E:d(i())}function y(){var e=i(),n=m(e);if(b=arguments,h=this,x=e,n){if(void 0===_)return u(x);if(M)return clearTimeout(_),_=setTimeout(f,t),o(x)}return void 0===_&&(_=setTimeout(f,t)),E}var b,h,g,E,_,x,O=0,j=!1,M=!1,T=!0;if("function"!=typeof e)throw new TypeError(a);return t=l(t)||0,r(n)&&(j=!!n.leading,M="maxWait"in n,g=M?c(l(n.maxWait)||0,t):g,T="trailing"in n?!!n.trailing:T),y.cancel=w,y.flush=v,y}var r=n(0),i=n(8),l=n(11),a="Expected a function",c=Math.max,s=Math.min;e.exports=o},function(e,t,n){var o=n(1),r=function(){return o.Date.now()};e.exports=r},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(10))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){function o(e){if("number"==typeof e)return e;if(i(e))return l;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=s.test(e);return n||u.test(e)?p(e.slice(2),n?2:8):c.test(e)?l:+e}var r=n(0),i=n(12),l=NaN,a=/^\s+|\s+$/g,c=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,p=parseInt;e.exports=o},function(e,t,n){function o(e){return"symbol"==typeof e||i(e)&&r(e)==l}var r=n(13),i=n(16),l="[object Symbol]";e.exports=o},function(e,t,n){function o(e){return null==e?void 0===e?c:a:s&&s in Object(e)?i(e):l(e)}var r=n(2),i=n(14),l=n(15),a="[object Null]",c="[object Undefined]",s=r?r.toStringTag:void 0;e.exports=o},function(e,t,n){function o(e){var t=l.call(e,c),n=e[c];try{e[c]=void 0;var o=!0}catch(e){}var r=a.call(e);return o&&(t?e[c]=n:delete e[c]),r}var r=n(2),i=Object.prototype,l=i.hasOwnProperty,a=i.toString,c=r?r.toStringTag:void 0;e.exports=o},function(e,t){function n(e){return r.call(e)}var o=Object.prototype,r=o.toString;e.exports=n},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n}]);
includes/vi/vi_actions.php CHANGED
@@ -14,7 +14,7 @@ if (function_exists('tenup_display_ads_txt'))
14
 
15
  add_shortcode('embed-vi-ad', array(get_class(), 'vi_js_shortcode'));
16
 
17
- if ((bool)self::$alloptions[self::$opt_vi_active])
18
  {
19
  add_filter('the_content', array(get_class(), 'vi_js_placement'));
20
  self::wp_insert_vi_gdpr_popup_init();
14
 
15
  add_shortcode('embed-vi-ad', array(get_class(), 'vi_js_shortcode'));
16
 
17
+ if (!empty(self::$alloptions[self::$opt_vi_active]))
18
  {
19
  add_filter('the_content', array(get_class(), 'vi_js_placement'));
20
  self::wp_insert_vi_gdpr_popup_init();
readme.txt CHANGED
@@ -1,26 +1,26 @@
1
  === Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream ===
2
  Contributors: embedplus
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
- Tags: youtube gallery, video gallery, youtube channel, youtube live, youtube playlist
5
  Requires at least: 4.1
6
- Tested up to: 5.6
7
- Stable tag: 13.4.1.2
8
  License: GPLv3 or later
9
 
10
- YouTube Embed WordPress Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, or YouTube.com live stream (with GDPR options)
11
 
12
  == Description ==
13
 
14
- **A WordPress YouTube embed, YouTube gallery (channel or playlist), and even YouTube livestream or premiere can be customized in a wide variety of ways with this plugin. Here are a few recently added features:**
15
 
 
16
  * Compatible with the WordPress Gutenberg block editor (it also stays backwards-compatible with the classic editor). Both the Gutenberg block selector and the Gutenberg classic block will show the YouTube wizard button. For the Gutenberg block selector, click on the (+) sign for the block editor list. The YouTube Wizard block is located under the "Embeds" category (make sure you choose "YouTube **Wizard**"). See more on [how to embed a YouTube video, gallery, or livestream with the WordPress Gutenberg block editor here >>](https://www.embedplus.com/embed-youtube-video-gallery-livestream-wordpress-gutenberg-block-editor.aspx) The plugin is also compatible with several popular page builders like [Elementor](https://www.youtube.com/watch?v=ldNfIGRTxDU), [Beaver Builder](https://www.youtube.com/watch?v=bPgz0jyt7TE), [SiteOrigin](https://www.youtube.com/watch?v=7QNYw_g-7WM), and [Visual Composer](https://www.youtube.com/watch?v=FWBQc9XhAqM). For these and pretty much any other page builder with a short code widget, you can also embed your video, gallery, live stream, or premiere by creating the short code in the plugin's wizard and then embedding the code in the page builder's short code widget or text widget.
17
  * Privacy and Consent - Improved privacy and GDPR compliance options like YouTube no cookie, YouTube API restrictions, and a customizable GDPR consent message
18
- * YouTube gallery capability (channel and playlist) – The ability to make playlist and channel embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
19
  * YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
20
  * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and displays the livestream for you. You can embed a direct link to a livestream too.
21
  * YouTube Premieres - You can also embed premiere videos using the same method we created for live streams
22
  * Simultaneous playback control - you can enable/disable the ability for visitors to have separate videos running at the same time on the same page. This also works with YouTube livestream and gallery embeds.
23
- * JavaScript deferral – improve the initial load time of your pages by allowing this plugin's scripts to begin execution only after a page is loaded. Tested using [GTmetrix >>](https://gtmetrix.com/)
24
  * Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
25
  * Improved ajax theme support
26
  * Site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
@@ -107,7 +107,7 @@ See more details after installing. Enjoy!
107
 
108
  1. Use the WordPress plugin installer to install the plugin. Alternatively, you can just extract the folder in our download package and upload it to your plugin directory.
109
  1. Access the Plugins admin menu to activate the YouTube embed plugin.
110
- 1. Make your default settings after clicking the new YouTube menu item that shows up in your admin panel.
111
  1. To embed videos in your post, uuse the wizard to embed the shortcode. Example: `[embedyt]https://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]` If you don't know exactly which video you want to embed, use the free built-in search feature to find and insert one.
112
  1. You can also [embed a playlist and channel gallery with this plugin >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Please install the plugin and visit the settings page for instructions.
113
  1. To get video SEO, an analytics dashboard and many other premium features, [sign up for one of the options here >>](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=readme)
@@ -151,6 +151,10 @@ You can also start and end each individual video at particular times. Like the a
151
 
152
  == Changelog ==
153
 
 
 
 
 
154
  = Embed Plus for YouTube WordPress Plugin 13.4.1.2 =
155
  * Allows you to specify the default language (when available) that the player will use to display closed captions
156
 
1
  === Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream ===
2
  Contributors: embedplus
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
+ Tags: youtube gallery, minify css defer javascript, youtube channel, youtube live, youtube playlist
5
  Requires at least: 4.1
6
+ Tested up to: 5.7
7
+ Stable tag: 13.4.2
8
  License: GPLv3 or later
9
 
10
+ YouTube Embed Plugin. Embed a responsive video, YouTube channel gallery, playlist gallery, YouTube live stream. With defer JavaScript options
11
 
12
  == Description ==
13
 
14
+ **A WordPress YouTube embed, YouTube gallery (channel or playlist), and even YouTube livestream or premiere can be customized in a wide variety of ways. It focuses on performance with the ability to defer JavaScript, while serving minified CSS and JavaScript. Here are a few recently added features:**
15
 
16
+ * Defer critical and non critical JavaScript - improve the initial load time of your pages by allowing this plugin's critical and non critical Javascript code to begin execution only after a page is loaded. That reasoning is the basis for the Defer CSS Javascript (styles and code) recommendation you'll see in various web profiling tools. We plan to allow you to defer critical and non critical CSS in the near future.
17
  * Compatible with the WordPress Gutenberg block editor (it also stays backwards-compatible with the classic editor). Both the Gutenberg block selector and the Gutenberg classic block will show the YouTube wizard button. For the Gutenberg block selector, click on the (+) sign for the block editor list. The YouTube Wizard block is located under the "Embeds" category (make sure you choose "YouTube **Wizard**"). See more on [how to embed a YouTube video, gallery, or livestream with the WordPress Gutenberg block editor here >>](https://www.embedplus.com/embed-youtube-video-gallery-livestream-wordpress-gutenberg-block-editor.aspx) The plugin is also compatible with several popular page builders like [Elementor](https://www.youtube.com/watch?v=ldNfIGRTxDU), [Beaver Builder](https://www.youtube.com/watch?v=bPgz0jyt7TE), [SiteOrigin](https://www.youtube.com/watch?v=7QNYw_g-7WM), and [Visual Composer](https://www.youtube.com/watch?v=FWBQc9XhAqM). For these and pretty much any other page builder with a short code widget, you can also embed your video, gallery, live stream, or premiere by creating the short code in the plugin's wizard and then embedding the code in the page builder's short code widget or text widget.
18
  * Privacy and Consent - Improved privacy and GDPR compliance options like YouTube no cookie, YouTube API restrictions, and a customizable GDPR consent message
19
+ * YouTube gallery capability: channel and playlist – The ability to make playlist and channel embeds have a gallery layout. By default, the plugin can generate a grid-based [responsive playlist or channel gallery >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Your visitors can browse through pages of video thumbnails and choose from videos that are pulled from an entire YouTube channel or playlist.
20
  * YouTube gallery auto continuous play - embed a playlist or channel gallery and allow it to play one video after the next without requiring viewers to click a thumbnail
21
  * YouTube Live Stream - Given a link to a YouTube channel, the plugin wizard automatically finds a livestream if one is active in that channel and displays the livestream for you. You can embed a direct link to a livestream too.
22
  * YouTube Premieres - You can also embed premiere videos using the same method we created for live streams
23
  * Simultaneous playback control - you can enable/disable the ability for visitors to have separate videos running at the same time on the same page. This also works with YouTube livestream and gallery embeds.
 
24
  * Improved accessibility by using title attributes for screen reader support. It should help your site pass functional accessibility evaluations (FAE).
25
  * Improved ajax theme support
26
  * Site origin information with each embed code as an extra security measure. In YouTube's/Google's own words, checking this option "protects against malicious third-party JavaScript being injected into your page and hijacking control of your YouTube player." We especially recommend checking it as it adds higher security than the built-in YouTube embedding method that comes with the current version of WordPress (i.e. oembed).
107
 
108
  1. Use the WordPress plugin installer to install the plugin. Alternatively, you can just extract the folder in our download package and upload it to your plugin directory.
109
  1. Access the Plugins admin menu to activate the YouTube embed plugin.
110
+ 1. Make your default settings after clicking the new YouTube menu item that shows up in your admin panel. This is where you can make global settings on the appearance of each video and gallery, as well as activate: defer JavaScript (defer CSS coming soon), GDPR mode, user restrictions, and more.
111
  1. To embed videos in your post, uuse the wizard to embed the shortcode. Example: `[embedyt]https://www.youtube.com/watch?v=ABCDEFGHIJK&width=400&height=250[/embedyt]` If you don't know exactly which video you want to embed, use the free built-in search feature to find and insert one.
112
  1. You can also [embed a playlist and channel gallery with this plugin >>](https://www.embedplus.com/responsive-youtube-playlist-channel-gallery-for-wordpress.aspx). Please install the plugin and visit the settings page for instructions.
113
  1. To get video SEO, an analytics dashboard and many other premium features, [sign up for one of the options here >>](https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=readme)
151
 
152
  == Changelog ==
153
 
154
+ = Embed Plus for YouTube WordPress Plugin 13.4.2 =
155
+ * Compatible with latest jQuery updates
156
+ * Compatible with WordPress 5.7+
157
+
158
  = Embed Plus for YouTube WordPress Plugin 13.4.1.2 =
159
  * Allows you to specify the default language (when available) that the player will use to display closed captions
160
 
scripts/ytprefs-admin.js CHANGED
@@ -279,7 +279,8 @@
279
  // Create IE + others compatible event handler
280
  var epeventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
281
  var epeventer = window[epeventMethod];
282
- var epmessageEvent = epeventMethod === "attachEvent" ? "onmessage" : "message";
 
283
  // Listen to message from child window
284
  epeventer(epmessageEvent, function (e)
285
  {
@@ -354,7 +355,7 @@
354
  {
355
  send_to_editor('<p>[embed-vi-ad]</p>');
356
  });
357
- $(window).resize(window._EPYTA_.widen_ytprefs_wiz);
358
 
359
  $(document).on('wp-before-tinymce-init.ytprefs-media_button', function (event, init)
360
  {
@@ -385,7 +386,7 @@
385
  {
386
  e.preventDefault();
387
  var tab = $(this).attr('href');
388
- $('.nav-tab-wrapper a[href="' + tab + '"], .nav-tab-wrapper a[rel="' + tab + '"]').click();
389
  });
390
 
391
 
@@ -394,7 +395,7 @@
394
  if (ev.which == 13)
395
  {
396
  ev.preventDefault();
397
- $(this).find('.ytprefs-ajax-form--submit:not([disabled])').click();
398
  }
399
  });
400
 
@@ -658,7 +659,7 @@
658
  $('.vi-how-works').on('click', function ()
659
  {
660
  var hash = $(this).data('jump'); // jstab
661
- $('.nav-tab-wrapper > a[href="' + hash + '"]').click();
662
  });
663
 
664
  $(document).on('click', '.wrap-vi-settings .nav-tab-wrapper a', function ()
@@ -1172,7 +1173,7 @@
1172
  {
1173
  if (_EPYTA_.onboarded != '1')
1174
  {
1175
- $('.ytprefs-onboarding-launch').click();
1176
  }
1177
  }); // end onload
1178
  })(window, jQuery);
279
  // Create IE + others compatible event handler
280
  var epeventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
281
  var epeventer = window[epeventMethod];
282
+ var epmessageEvent = epeventMethod == "attachEvent" ? "onmessage" : "message";
283
+
284
  // Listen to message from child window
285
  epeventer(epmessageEvent, function (e)
286
  {
355
  {
356
  send_to_editor('<p>[embed-vi-ad]</p>');
357
  });
358
+ $(window).on('resize', window._EPYTA_.widen_ytprefs_wiz);
359
 
360
  $(document).on('wp-before-tinymce-init.ytprefs-media_button', function (event, init)
361
  {
386
  {
387
  e.preventDefault();
388
  var tab = $(this).attr('href');
389
+ $('.nav-tab-wrapper a[href="' + tab + '"], .nav-tab-wrapper a[rel="' + tab + '"]').trigger('click');
390
  });
391
 
392
 
395
  if (ev.which == 13)
396
  {
397
  ev.preventDefault();
398
+ $(this).find('.ytprefs-ajax-form--submit:not([disabled])').trigger('click');
399
  }
400
  });
401
 
659
  $('.vi-how-works').on('click', function ()
660
  {
661
  var hash = $(this).data('jump'); // jstab
662
+ $('.nav-tab-wrapper > a[href="' + hash + '"]').trigger('click');
663
  });
664
 
665
  $(document).on('click', '.wrap-vi-settings .nav-tab-wrapper a', function ()
1173
  {
1174
  if (_EPYTA_.onboarded != '1')
1175
  {
1176
+ $('.ytprefs-onboarding-launch').trigger('click');
1177
  }
1178
  }); // end onload
1179
  })(window, jQuery);
scripts/ytprefs-admin.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- (function(a,b){a._EPYTA_.widen_ytprefs_wiz=a._EPYTA_.widen_ytprefs_wiz||function(){setTimeout(function(){var c=Math.min(950,b(a).width()-100);var d=-1*c/2;b("#TB_window").addClass("epyt-thickbox").animate({marginLeft:d,width:c},150,"swing",function(){b("#TB_window").get(0).style.setProperty("width",c,"important")});b("#TB_overlay").addClass("epyt-thickbox");b("#TB_window iframe").animate({width:c},150)},750)};a._EPYTA_.ytvi_cancel=a._EPYTA_.ytvi_cancel||function(){b(".ytvi-step").hide("fade",{},500,function(){b(".ytvi-step-1").show("fade",{},500)})};a._EPYTA_.moneyFormat=a._EPYTA_.moneyFormat||function(c){return"$"+parseFloat(c).toFixed(2)};a._EPYTA_.escId=function(c){return"#"+c.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")};a._EPYTA_.demoBackgroundColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info").css("background-color",b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).val())},0)};a._EPYTA_.demoTextColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info *").css("color",b(a._EPYTA_.escId("vi_js_settings[textColor]")).val())},0)};a._EPYTA_.demoFontFamily=function(){b(".vi-story-demo--title").css("font-family",b(a._EPYTA_.escId("vi_js_settings[font]")).val())};a._EPYTA_.demoFontSize=function(){b(".vi-story-demo--title").css("font-size",b(a._EPYTA_.escId("vi_js_settings[fontSize]")).val()+"px")};a._EPYTA_.onboardNext=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.next().addClass("active-step")},600)};a._EPYTA_.onboardPrev=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.prev().addClass("active-step")},600)};a._EPYTA_.selectText=function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}};a._EPYTA_.adstxtLookup=function(){a._EPYTA_.adstxtLoading(true);b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt?c="+Date.now(),dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(c,h,f){if(h==="success"){var d=f;var e=c;switch(d.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(e);break;default:a._EPYTA_.adstxtVerify("");break}}else{var d=c;var g=f;if(d.status==404){b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt",dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(i,m,l){if(m==="success"){var j=l;var k=i;switch(j.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(k);break;default:a._EPYTA_.adstxtVerify("");break}}else{a._EPYTA_.adstxtVerify("")}})}else{a._EPYTA_.adstxtVerify("")}}})};a._EPYTA_.adstxtVerify=function(c){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_adstxt_status_soft_ajax",current_adstxt:c},success:function(d){if(d.code==2){b(".nav-tab-adstxt").addClass("nav-tab-valid")}else{if(d.code<=0){b(".nav-tab-adstxt").addClass("nav-tab-invalid")}}b(".adstxt-verify-message").html(d.message)},error:function(f,d,e){b(".nav-tab-adstxt").addClass("nav-tab-invalid");b(".adstxt-verify-message").html("Could not validate ads.txt: "+e)},complete:function(){a._EPYTA_.adstxtLoading(false)}})};a._EPYTA_.adstxtLoading=function(c){if(c){b(".nav-tab-adstxt").addClass("nav-tab-loading")}else{b(".nav-tab-adstxt").removeClass("nav-tab-loading")}};a._EPYTA_.gbPreviewSetup=function(){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API GB");a._EPADashboard_.pageReady();jQuery("body").fitVidsEP()};a._EPYTA_.iabAdd=function(e,d,c){var f=b('<div class="iab-cat-tag-button" data-tag="'+e+'">'+c+" : "+d+" &times;</div>");b(".iab-cat-tags-display").append(f);b(".iab-cat-tags-display .iab-cat-tag-button").sort(function(h,g){return b(h).text()>b(g).text()?1:-1}).appendTo(".iab-cat-tags-display")};b.fn.ytprefsFormJSON=function(){var d={};var c=this.serializeArray();b.each(c,function(){if(d[this.name]){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});return d};b(document).ready(function(){if(a.location.toString().indexOf("https://")===0){a._EPYTA_.wpajaxurl=a._EPYTA_.wpajaxurl.replace("http://","https://")}var g=a.addEventListener?"addEventListener":"attachEvent";var e=a[g];var d=g==="attachEvent"?"onmessage":"message";e(d,function(k){var i="";try{if(k.data.indexOf("youtubeembedplus")===0&&k.data.indexOf("clientId=")<0){i=k.data.split("|")[1];if(i.indexOf("[")!==0){i="<p>"+i+"</p>"}if(a.tinyMCE!==null&&a.tinyMCE.activeEditor!==null&&!a.tinyMCE.activeEditor.isHidden()){if(a._EPYTA_.mceBookmark){try{a.tinyMCE.activeEditor.selection.moveToBookmark(a._EPYTA_.mceBookmark)}catch(j){}}if(typeof a.tinyMCE.execInstanceCommand!=="undefined"){a.tinyMCE.execInstanceCommand(a.tinyMCE.activeEditor.id,"mceInsertContent",false,i)}else{send_to_editor(i)}setTimeout(function(){a._EPYTA_.mceBookmark=null},500)}else{i=i.replace("<p>","\n").replace("</p>","\n");if(typeof QTags.insertContent==="function"){QTags.insertContent(i)}else{send_to_editor(i)}}tb_remove()}}catch(j){}},false);b("body").on("click.tbyt","#ytprefs_wiz_button, .ytprefs_wiz_button_widget_text, .ytprefs-onboarding-launch",function(){a._EPYTA_.widen_ytprefs_wiz()});b("body").on("click.tbyt","#ytprefs_wiz_button_vi, .ytprefs_wiz_button_vi_widget_text",function(){send_to_editor("<p>[embed-vi-ad]</p>")});b(a).resize(a._EPYTA_.widen_ytprefs_wiz);b(document).on("wp-before-tinymce-init.ytprefs-media_button",function(i,j){$media_buttons=b(j.selector).closest(".wp-editor-wrap").find(".wp-media-buttons");if(!$media_buttons.find(".ytprefs_media_link").length){$media_buttons.append('<a href="'+encodeURI(a._EPYTA_.wizhref)+'" class="thickbox button ytprefs_media_link ytprefs_wiz_button_widget_text" title="Visual YouTube Search Tool and Wizard - For easier embedding"><span></span> YouTube</a>');if(a._EPYTA_.manage_options&&a._EPYTA_.vi_logged_in){$media_buttons.append('<a class="button ytprefs_vi_embed_shortcode" id="ytprefs_wiz_button_vi" title="Embed vi video ad"><span></span> Video Ad</a>')}}});if(b(".wrap-vi-settings").length){a._EPYTA_.adstxtLookup()}b('.wrap section a[href^="#jump"]').on("click",function(j){j.preventDefault();var i=b(this).attr("href");b('.nav-tab-wrapper a[href="'+i+'"], .nav-tab-wrapper a[rel="'+i+'"]').click()});b(".ytprefs-ajax-form").on("keypress",function(i){if(i.which==13){i.preventDefault();b(this).find(".ytprefs-ajax-form--submit:not([disabled])").click()}});b(a).on("hashchange",function(){if(a.location.hash.length>0&&false){$section=b("section"+a.location.hash);if($section.length>0){$section.find("h2").addClass("ytvi-hash-scroll");setTimeout(function(){$section.find("h2").removeClass("ytvi-hash-scroll")},2000)}$jumper=b(".jumper"+a.location.hash);if($jumper.length>0){b(".jumper"+a.location.hash+" + h3.sect").addClass("ytvi-hash-scroll");setTimeout(function(){b(".jumper"+a.location.hash+" + h3.sect").removeClass("ytvi-hash-scroll")},2000)}}});b(".vi-cover-prompt-no").on("click",function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_hide_feature_ajax"},success:function(i){if(!i||i.type==="error"){alertify.alert(i.message)}else{if(a!=a.top){a.location.reload()}else{a.top.location.href=i.url}}},error:function(k,i,j){alertify.alert('Sorry, there was a network error. Please try again, or turn off this feature using the "Hide Monetize Feature" checkbox on the "Defaults" tab of the YouTube settings. If the issue persists, please contact ext@embedplus.com')},complete:function(){}})});b(".vi-cover-prompt-yes").on("click",function(){b(".vi-cover-prompt, .vi-cover-clear").fadeOut(500);var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url});b(".vi-cover-prompt-maybe").on("click",function(){var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url;if(a!=a.top){a.location.reload()}else{a.top.location.href=a._EPYTA_.admin_url_ytprefs}});if(b(".vi-demo-screen").length>1){var f=setInterval(function(){b(".vi-demo-screen-2").toggleClass("demo-hide");b(".vi-demo-mobile-caption").toggleClass("demo-hide")},20000)}b(".ytvi-step-1--submit-register").on("click",function(i){var j=b.trim(b(".ytvi-register-email").val());if(!j.length){alertify.alert("Please enter your email address.")}else{b(".ytvi-step-1--submit-register").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-step-2-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_cache_endpoints_ajax",email:j,domain:a.location.href},success:function(k){if(k.type=="success"){b(".ytvi-step-2 .ytvi-registration iframe").attr("src",k.signupURLParams);setTimeout(function(){b(".ytvi-step-2-loading").hide("fade",{},500,function(){b(".ytvi-step-2").show("fade",{},500)})},3000);var m=new Date(),l=new Date();l.setTime(l.getTime()+(365*24*60*60*1000));document.cookie="vi_signup_attempt="+m.toUTCString()+";expires="+l.toUTCString()+";path="+a._EPYTA_.admin_url}else{if(k.type==="error"){alertify.alert(k.message);a._EPYTA_.ytvi_cancel()}}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-register").prop("disabled",false)}})})})}});b(".ytvi-registration--cancel").on("click",function(){a._EPYTA_.ytvi_cancel()});b(".ytvi-step-1--confirm").on("change",function(){if(b(this).is(":checked")){b(".ytvi-step-1--submit-register").prop("disabled",false)}else{b(".ytvi-step-1--submit-register").prop("disabled",true)}});b(".ytvi-step-1--submit-login").on("click",function(k){var l=b.trim(b(".ytvi-login-email").val());var i=b.trim(b(".ytvi-password").val());var j="";j+=l.length?"":"Please enter your email address. ";j+=i.length?"":"Please enter your vi dashboard password.";if(j.length){alertify.alert(j)}else{b(".ytvi-step-1--submit-login").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-login-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_login_ajax",email:l,password:i},success:function(m){if(m.type==="error"){alertify.alert(m.message);a._EPYTA_.ytvi_cancel()}else{b(".ytvi-login-loading").hide("fade",{},500,function(){document.cookie="vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";b(".ytvi-login-success-message").html(m.message);b(".ytvi-login-success").show("fade",{},500,function(){})})}},error:function(o,m,n){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-login").prop("disabled",false)}})})})}});b("a.vi-logged-in-goto").each(function(){if(b(this).attr("href").indexOf(a.location.pathname+a.location.search)>0||a.location.search.indexOf("youtube-my-preferences")>0){b(this).removeAttr("target")}});if(b(".wrap-vi-settings").length){b(".vi-how-works").on("click",function(){var i=b(this).data("jump");b('.nav-tab-wrapper > a[href="'+i+'"]').click()});b(document).on("click",".wrap-vi-settings .nav-tab-wrapper a",function(){$a=b(this);b(".wrap-vi-settings .nav-tab-wrapper a").removeClass("nav-tab-active");$a.addClass("nav-tab-active");b(".wrap-vi-settings section").hide();b(".wrap-vi-settings section").filter($a.attr("href")).fadeIn(200);return false});var c=b(".iab-cat-tags").val();if(c.length>0){var h=c.split(",");h.forEach(function(k){var j=b('.iab-cat-child option[value="'+k+'"]').text();var i=b('.iab-cat-parent option[value="'+(k.split("-")[0])+'"]').text();a._EPYTA_.iabAdd(k,j,i)})}b(".iab-cat-parent").on("change",function(){var i=b(this).val();b(".iab-cat-child").val(i);if(i==""){b(".iab-cat-child-box").addClass("hidden");b(".iab-cat-child-box select").prop("disabled",true)}else{b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+i+'-"], .iab-cat-child option[value="'+i+'"], .iab-cat-child option[value=""]').removeClass("hidden");b(".iab-cat-child-box select").val("")}});b(".iab-cat-child").on("change",function(){var l=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];if(l.length<4){var k=b(this).val();var j=b(this).find("option:selected").text();var i=b(".iab-cat-parent").find("option:selected").text();if(k&&l.indexOf(k)==-1){l.push(k);b(".iab-cat-tags").val(l.join(","));a._EPYTA_.iabAdd(k,j,i)}}else{alertify.alert("You can choose up to 4 categories maximum. In order to add a new one, you must remove one of the existing ones.")}});b(".iab-cat-tags-display").on("click",".iab-cat-tag-button",function(){var i=b(this);var j=i.data("tag");var k=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];k=k.filter(function(l){return l!=j});b(".iab-cat-tags").val(k.join(","));i.remove()});a._EPYTA_.demoBackgroundColor();a._EPYTA_.demoTextColor();a._EPYTA_.demoFontFamily();a._EPYTA_.demoFontSize();b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).wpColorPicker({change:a._EPYTA_.demoBackgroundColor});b(a._EPYTA_.escId("vi_js_settings[textColor]")).wpColorPicker({change:a._EPYTA_.demoTextColor});b(a._EPYTA_.escId("vi_js_settings[font]")).on("change",a._EPYTA_.demoFontFamily);b(a._EPYTA_.escId("vi_js_settings[fontSize]")).on("change",a._EPYTA_.demoFontSize);b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_reports_ajax"},success:function(l){if(l.type==="error"||!l.data.mtdReport.length||typeof(l.data.mtdReport[0].date)==="undefined"){b(".vi-report-error").removeClass("hide");b(".vi-report").addClass("hide")}else{var n=l.data.mtdReport.map(function(p,o){return{x:moment(p.date,"YYYY-MM-DD").format(),y:p.revenue}});b(".vi-total-earnings-num").text(a._EPYTA_.moneyFormat(l.data.netRevenue));var k=moment(n.length?n[0].x:new Date()).format("MMMM YYYY");var j=document.getElementById("vi-report-canvas").getContext("2d");var m={type:"line",data:{datasets:[{label:k+" Earnings (USD)",backgroundColor:"#1193aa",borderColor:"#1193aa",fill:false,data:n}]},options:{responsive:true,maintainAspectRatio:false,plugins:{deferred:{delay:1000},},title:{display:false},legend:{labels:{fontSize:15,fontColor:"#000000"}},tooltips:{position:"nearest",mode:"index",intersect:false,callbacks:{label:function(o,p){return a._EPYTA_.moneyFormat(o.yLabel)},title:function(o,p){return moment(o[0].xLabel).format("LL")}}},scales:{xAxes:[{type:"time",time:{unit:"day",unitStepSize:1,displayFormats:{day:"MMM DD"}},display:true,scaleLabel:{display:true,labelString:"Date",fontSize:15,fontColor:"#000000"},ticks:{major:{fontStyle:"bold",fontColor:"#000000"}}}],yAxes:[{display:true,scaleLabel:{display:true,labelString:"Revenue",fontSize:15,fontColor:"#000000"},ticks:{callback:function(q,p,o){return a._EPYTA_.moneyFormat(q)}}}]}}};Chart.defaults.global.defaultFontFamily="'Segoe UI', Roboto, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";var i=new Chart(j,m)}},error:function(k,i,j){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}});b(".ytvi-btn-logout").on("click",function(){var j="";var i=b(".iab-cat-tags").val();if(i.length>0&&i.split(",").length>1){j=" (Note: If you selected more than one video category, you must stay logged in to this settings page for your categories to automatically add variety to your ads)"}alertify.confirm().set({title:"Logout of Monetize settings",message:"Logging out won't delete your settings. However, it will require you or any other admins to re-login to change vi ad settings in the future"+j+".<br><br>To actually disable monetization, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_logout_ajax"},success:function(k){if(k.type==="error"){alertify.alert(k.message)}else{location.href=k.url}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()})}b(".ytvi-btn-toggle").on("click",function(){var i=b(this);alertify.confirm().set({title:(i.hasClass("ytvi-btn-active")?"Turn off":"Turn on")+" your vi ads",message:i.hasClass("ytvi-btn-active")?"Are you sure you would like to deactivate your video ads? Please note that your ads will no longer appear on the front end and your revenue will be paused. If you would like them to reappear later, simply click on this button again.":"Click OK to confirm turning on your vi ads. They will appear on your site according to your <strong>Placement</strong> settings.",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_toggle_ajax"},success:function(j){if(j.type==="error"){alertify.alert(j.message)}else{i.find("strong").text(j.button_text);i.toggleClass("ytvi-btn-active ytvi-btn-inactive");if(i.hasClass("ytvi-btn-active")){b(".ytvi-msg-congrats").show(200)}else{b(".ytvi-msg-congrats").hide()}}},error:function(l,j,k){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()});b(".ytvi-intro-video-modal").on("click",function(k){k.preventDefault();var i=Math.min(document.body.clientWidth*0.8,800);var j=9/16*i;alertify.YoutubeDialog("BcrNPnWUkVI").set({frameless:true,resizeable:true}).resizeTo(i,j)});b("#vi_show_gdpr_authorization").on("change",function(){if(b(this).is(":checked")){b(".opt_vi_show_privacy_button").show(300)}else{b(".opt_vi_show_privacy_button").hide(300)}});if(b(".wrap-ytprefs-onboarding").length){b(".ytprefs-ob-nav-close").on("click",function(){a.parent.tb_remove();a.top.location.reload()});b(".ytprefs-ob-nav-prev").on("click",function(){a._EPYTA_.onboardPrev(b(this).closest(".ytprefs-ob-step"))});b(".ytprefs-ob-filter li").hover(function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).addClass("yob-icon-visible")},function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).removeClass("yob-icon-visible")});b('.ytprefs-ob-filter input[type="checkbox"]').on("change",function(){var i=b(this);var j=i.data("obfilter");var k=b('.ytprefs-ob-filter input[type="checkbox"]:checked');if(k.length&&!(k.length===1&&k.is('[data-obfilter="yob-monetize"]'))){b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",false)}else{b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",true)}if(j=="yob-monetize"){b(".ytprefs-ob-step3 .ytprefs-ob-nav-ultimate, .ytprefs-ob-step3 .ytprefs-ob-nav-penultimate").toggleClass("ytprefs-ob-nav-hide")}else{if(i.is(":checked")){b(".ytprefs-ob-step2 ."+j).addClass(j+"-visible")}else{b(".ytprefs-ob-step2 ."+j).removeClass(j+"-visible")}}});b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding").on("submit",function(k){k.preventDefault();(a.tinyMCE||a.tinymce).triggerSave();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})});b(".ytprefs-ob-step3 .ytprefs-ob-nav-skip").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding-apikey").on("submit",function(k){k.preventDefault();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){if(i.find(".ytprefs-ob-nav-ultimate").hasClass("ytprefs-ob-nav-hide")){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{a.parent.tb_remove();a.top.location.reload()}}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})})}});b(a).on("load",function(){if(_EPYTA_.onboarded!="1"){b(".ytprefs-onboarding-launch").click()}})})(window,jQuery);
1
 
2
+ (function(a,b){a._EPYTA_.widen_ytprefs_wiz=a._EPYTA_.widen_ytprefs_wiz||function(){setTimeout(function(){var c=Math.min(950,b(a).width()-100);var d=-1*c/2;b("#TB_window").addClass("epyt-thickbox").animate({marginLeft:d,width:c},150,"swing",function(){b("#TB_window").get(0).style.setProperty("width",c,"important")});b("#TB_overlay").addClass("epyt-thickbox");b("#TB_window iframe").animate({width:c},150)},750)};a._EPYTA_.ytvi_cancel=a._EPYTA_.ytvi_cancel||function(){b(".ytvi-step").hide("fade",{},500,function(){b(".ytvi-step-1").show("fade",{},500)})};a._EPYTA_.moneyFormat=a._EPYTA_.moneyFormat||function(c){return"$"+parseFloat(c).toFixed(2)};a._EPYTA_.escId=function(c){return"#"+c.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1")};a._EPYTA_.demoBackgroundColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info").css("background-color",b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).val())},0)};a._EPYTA_.demoTextColor=function(c,d){setTimeout(function(){b(".vi-story-demo--info *").css("color",b(a._EPYTA_.escId("vi_js_settings[textColor]")).val())},0)};a._EPYTA_.demoFontFamily=function(){b(".vi-story-demo--title").css("font-family",b(a._EPYTA_.escId("vi_js_settings[font]")).val())};a._EPYTA_.demoFontSize=function(){b(".vi-story-demo--title").css("font-size",b(a._EPYTA_.escId("vi_js_settings[fontSize]")).val()+"px")};a._EPYTA_.onboardNext=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.next().addClass("active-step")},600)};a._EPYTA_.onboardPrev=function(c){b(".ytprefs-ob-step").removeClass("active-step");setTimeout(function(){a.scrollTo(0,0);c.prev().addClass("active-step")},600)};a._EPYTA_.selectText=function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}};a._EPYTA_.adstxtLookup=function(){a._EPYTA_.adstxtLoading(true);b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt?c="+Date.now(),dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(c,h,f){if(h==="success"){var d=f;var e=c;switch(d.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(e);break;default:a._EPYTA_.adstxtVerify("");break}}else{var d=c;var g=f;if(d.status==404){b.ajax({url:location.protocol+"//"+location.hostname+"/ads.txt",dataType:"text",type:"get",data:"",headers:{"Cache-Control":"no-cache"},async:true}).always(function(i,m,l){if(m==="success"){var j=l;var k=i;switch(j.status){case 200:case 301:case 302:case 304:case 307:a._EPYTA_.adstxtVerify(k);break;default:a._EPYTA_.adstxtVerify("");break}}else{a._EPYTA_.adstxtVerify("")}})}else{a._EPYTA_.adstxtVerify("")}}})};a._EPYTA_.adstxtVerify=function(c){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_adstxt_status_soft_ajax",current_adstxt:c},success:function(d){if(d.code==2){b(".nav-tab-adstxt").addClass("nav-tab-valid")}else{if(d.code<=0){b(".nav-tab-adstxt").addClass("nav-tab-invalid")}}b(".adstxt-verify-message").html(d.message)},error:function(f,d,e){b(".nav-tab-adstxt").addClass("nav-tab-invalid");b(".adstxt-verify-message").html("Could not validate ads.txt: "+e)},complete:function(){a._EPYTA_.adstxtLoading(false)}})};a._EPYTA_.adstxtLoading=function(c){if(c){b(".nav-tab-adstxt").addClass("nav-tab-loading")}else{b(".nav-tab-adstxt").removeClass("nav-tab-loading")}};a._EPYTA_.gbPreviewSetup=function(){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API GB");a._EPADashboard_.pageReady();jQuery("body").fitVidsEP()};a._EPYTA_.iabAdd=function(e,d,c){var f=b('<div class="iab-cat-tag-button" data-tag="'+e+'">'+c+" : "+d+" &times;</div>");b(".iab-cat-tags-display").append(f);b(".iab-cat-tags-display .iab-cat-tag-button").sort(function(h,g){return b(h).text()>b(g).text()?1:-1}).appendTo(".iab-cat-tags-display")};b.fn.ytprefsFormJSON=function(){var d={};var c=this.serializeArray();b.each(c,function(){if(d[this.name]){if(!d[this.name].push){d[this.name]=[d[this.name]]}d[this.name].push(this.value||"")}else{d[this.name]=this.value||""}});return d};b(document).ready(function(){if(a.location.toString().indexOf("https://")===0){a._EPYTA_.wpajaxurl=a._EPYTA_.wpajaxurl.replace("http://","https://")}var g=a.addEventListener?"addEventListener":"attachEvent";var e=a[g];var d=g=="attachEvent"?"onmessage":"message";e(d,function(k){var i="";try{if(k.data.indexOf("youtubeembedplus")===0&&k.data.indexOf("clientId=")<0){i=k.data.split("|")[1];if(i.indexOf("[")!==0){i="<p>"+i+"</p>"}if(a.tinyMCE!==null&&a.tinyMCE.activeEditor!==null&&!a.tinyMCE.activeEditor.isHidden()){if(a._EPYTA_.mceBookmark){try{a.tinyMCE.activeEditor.selection.moveToBookmark(a._EPYTA_.mceBookmark)}catch(j){}}if(typeof a.tinyMCE.execInstanceCommand!=="undefined"){a.tinyMCE.execInstanceCommand(a.tinyMCE.activeEditor.id,"mceInsertContent",false,i)}else{send_to_editor(i)}setTimeout(function(){a._EPYTA_.mceBookmark=null},500)}else{i=i.replace("<p>","\n").replace("</p>","\n");if(typeof QTags.insertContent==="function"){QTags.insertContent(i)}else{send_to_editor(i)}}tb_remove()}}catch(j){}},false);b("body").on("click.tbyt","#ytprefs_wiz_button, .ytprefs_wiz_button_widget_text, .ytprefs-onboarding-launch",function(){a._EPYTA_.widen_ytprefs_wiz()});b("body").on("click.tbyt","#ytprefs_wiz_button_vi, .ytprefs_wiz_button_vi_widget_text",function(){send_to_editor("<p>[embed-vi-ad]</p>")});b(a).on("resize",a._EPYTA_.widen_ytprefs_wiz);b(document).on("wp-before-tinymce-init.ytprefs-media_button",function(i,j){$media_buttons=b(j.selector).closest(".wp-editor-wrap").find(".wp-media-buttons");if(!$media_buttons.find(".ytprefs_media_link").length){$media_buttons.append('<a href="'+encodeURI(a._EPYTA_.wizhref)+'" class="thickbox button ytprefs_media_link ytprefs_wiz_button_widget_text" title="Visual YouTube Search Tool and Wizard - For easier embedding"><span></span> YouTube</a>');if(a._EPYTA_.manage_options&&a._EPYTA_.vi_logged_in){$media_buttons.append('<a class="button ytprefs_vi_embed_shortcode" id="ytprefs_wiz_button_vi" title="Embed vi video ad"><span></span> Video Ad</a>')}}});if(b(".wrap-vi-settings").length){a._EPYTA_.adstxtLookup()}b('.wrap section a[href^="#jump"]').on("click",function(j){j.preventDefault();var i=b(this).attr("href");b('.nav-tab-wrapper a[href="'+i+'"], .nav-tab-wrapper a[rel="'+i+'"]').trigger("click")});b(".ytprefs-ajax-form").on("keypress",function(i){if(i.which==13){i.preventDefault();b(this).find(".ytprefs-ajax-form--submit:not([disabled])").trigger("click")}});b(a).on("hashchange",function(){if(a.location.hash.length>0&&false){$section=b("section"+a.location.hash);if($section.length>0){$section.find("h2").addClass("ytvi-hash-scroll");setTimeout(function(){$section.find("h2").removeClass("ytvi-hash-scroll")},2000)}$jumper=b(".jumper"+a.location.hash);if($jumper.length>0){b(".jumper"+a.location.hash+" + h3.sect").addClass("ytvi-hash-scroll");setTimeout(function(){b(".jumper"+a.location.hash+" + h3.sect").removeClass("ytvi-hash-scroll")},2000)}}});b(".vi-cover-prompt-no").on("click",function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_hide_feature_ajax"},success:function(i){if(!i||i.type==="error"){alertify.alert(i.message)}else{if(a!=a.top){a.location.reload()}else{a.top.location.href=i.url}}},error:function(k,i,j){alertify.alert('Sorry, there was a network error. Please try again, or turn off this feature using the "Hide Monetize Feature" checkbox on the "Defaults" tab of the YouTube settings. If the issue persists, please contact ext@embedplus.com')},complete:function(){}})});b(".vi-cover-prompt-yes").on("click",function(){b(".vi-cover-prompt, .vi-cover-clear").fadeOut(500);var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url});b(".vi-cover-prompt-maybe").on("click",function(){var i=new Date();i.setTime(i.getTime()+(365*24*60*60*1000));document.cookie="vi_cover_prompt_yes=1;expires="+i.toUTCString()+";path="+a._EPYTA_.admin_url;if(a!=a.top){a.location.reload()}else{a.top.location.href=a._EPYTA_.admin_url_ytprefs}});if(b(".vi-demo-screen").length>1){var f=setInterval(function(){b(".vi-demo-screen-2").toggleClass("demo-hide");b(".vi-demo-mobile-caption").toggleClass("demo-hide")},20000)}b(".ytvi-step-1--submit-register").on("click",function(i){var j=b.trim(b(".ytvi-register-email").val());if(!j.length){alertify.alert("Please enter your email address.")}else{b(".ytvi-step-1--submit-register").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-step-2-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:120000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_cache_endpoints_ajax",email:j,domain:a.location.href},success:function(k){if(k.type=="success"){b(".ytvi-step-2 .ytvi-registration iframe").attr("src",k.signupURLParams);setTimeout(function(){b(".ytvi-step-2-loading").hide("fade",{},500,function(){b(".ytvi-step-2").show("fade",{},500)})},3000);var m=new Date(),l=new Date();l.setTime(l.getTime()+(365*24*60*60*1000));document.cookie="vi_signup_attempt="+m.toUTCString()+";expires="+l.toUTCString()+";path="+a._EPYTA_.admin_url}else{if(k.type==="error"){alertify.alert(k.message);a._EPYTA_.ytvi_cancel()}}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-register").prop("disabled",false)}})})})}});b(".ytvi-registration--cancel").on("click",function(){a._EPYTA_.ytvi_cancel()});b(".ytvi-step-1--confirm").on("change",function(){if(b(this).is(":checked")){b(".ytvi-step-1--submit-register").prop("disabled",false)}else{b(".ytvi-step-1--submit-register").prop("disabled",true)}});b(".ytvi-step-1--submit-login").on("click",function(k){var l=b.trim(b(".ytvi-login-email").val());var i=b.trim(b(".ytvi-password").val());var j="";j+=l.length?"":"Please enter your email address. ";j+=i.length?"":"Please enter your vi dashboard password.";if(j.length){alertify.alert(j)}else{b(".ytvi-step-1--submit-login").prop("disabled",true);b(".ytvi-step-1").hide("fade",{},500,function(){b(".ytvi-login-loading").show("fade",{},500,function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_login_ajax",email:l,password:i},success:function(m){if(m.type==="error"){alertify.alert(m.message);a._EPYTA_.ytvi_cancel()}else{b(".ytvi-login-loading").hide("fade",{},500,function(){document.cookie="vi_signup_attempt=; expires=Thu, 01 Jan 1970 00:00:01 GMT;";b(".ytvi-login-success-message").html(m.message);b(".ytvi-login-success").show("fade",{},500,function(){})})}},error:function(o,m,n){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com");a._EPYTA_.ytvi_cancel()},complete:function(){b(".ytvi-step-1--submit-login").prop("disabled",false)}})})})}});b("a.vi-logged-in-goto").each(function(){if(b(this).attr("href").indexOf(a.location.pathname+a.location.search)>0||a.location.search.indexOf("youtube-my-preferences")>0){b(this).removeAttr("target")}});if(b(".wrap-vi-settings").length){b(".vi-how-works").on("click",function(){var i=b(this).data("jump");b('.nav-tab-wrapper > a[href="'+i+'"]').trigger("click")});b(document).on("click",".wrap-vi-settings .nav-tab-wrapper a",function(){$a=b(this);b(".wrap-vi-settings .nav-tab-wrapper a").removeClass("nav-tab-active");$a.addClass("nav-tab-active");b(".wrap-vi-settings section").hide();b(".wrap-vi-settings section").filter($a.attr("href")).fadeIn(200);return false});var c=b(".iab-cat-tags").val();if(c.length>0){var h=c.split(",");h.forEach(function(k){var j=b('.iab-cat-child option[value="'+k+'"]').text();var i=b('.iab-cat-parent option[value="'+(k.split("-")[0])+'"]').text();a._EPYTA_.iabAdd(k,j,i)})}b(".iab-cat-parent").on("change",function(){var i=b(this).val();b(".iab-cat-child").val(i);if(i==""){b(".iab-cat-child-box").addClass("hidden");b(".iab-cat-child-box select").prop("disabled",true)}else{b(".iab-cat-child-box").removeClass("hidden");b(".iab-cat-child-box select").prop("disabled",false);b(".iab-cat-child option").addClass("hidden");b('.iab-cat-child option[value^="'+i+'-"], .iab-cat-child option[value="'+i+'"], .iab-cat-child option[value=""]').removeClass("hidden");b(".iab-cat-child-box select").val("")}});b(".iab-cat-child").on("change",function(){var l=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];if(l.length<4){var k=b(this).val();var j=b(this).find("option:selected").text();var i=b(".iab-cat-parent").find("option:selected").text();if(k&&l.indexOf(k)==-1){l.push(k);b(".iab-cat-tags").val(l.join(","));a._EPYTA_.iabAdd(k,j,i)}}else{alertify.alert("You can choose up to 4 categories maximum. In order to add a new one, you must remove one of the existing ones.")}});b(".iab-cat-tags-display").on("click",".iab-cat-tag-button",function(){var i=b(this);var j=i.data("tag");var k=b(".iab-cat-tags").val()?b(".iab-cat-tags").val().split(","):[];k=k.filter(function(l){return l!=j});b(".iab-cat-tags").val(k.join(","));i.remove()});a._EPYTA_.demoBackgroundColor();a._EPYTA_.demoTextColor();a._EPYTA_.demoFontFamily();a._EPYTA_.demoFontSize();b(a._EPYTA_.escId("vi_js_settings[backgroundColor]")).wpColorPicker({change:a._EPYTA_.demoBackgroundColor});b(a._EPYTA_.escId("vi_js_settings[textColor]")).wpColorPicker({change:a._EPYTA_.demoTextColor});b(a._EPYTA_.escId("vi_js_settings[font]")).on("change",a._EPYTA_.demoFontFamily);b(a._EPYTA_.escId("vi_js_settings[fontSize]")).on("change",a._EPYTA_.demoFontSize);b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_reports_ajax"},success:function(l){if(l.type==="error"||!l.data.mtdReport.length||typeof(l.data.mtdReport[0].date)==="undefined"){b(".vi-report-error").removeClass("hide");b(".vi-report").addClass("hide")}else{var n=l.data.mtdReport.map(function(p,o){return{x:moment(p.date,"YYYY-MM-DD").format(),y:p.revenue}});b(".vi-total-earnings-num").text(a._EPYTA_.moneyFormat(l.data.netRevenue));var k=moment(n.length?n[0].x:new Date()).format("MMMM YYYY");var j=document.getElementById("vi-report-canvas").getContext("2d");var m={type:"line",data:{datasets:[{label:k+" Earnings (USD)",backgroundColor:"#1193aa",borderColor:"#1193aa",fill:false,data:n}]},options:{responsive:true,maintainAspectRatio:false,plugins:{deferred:{delay:1000},},title:{display:false},legend:{labels:{fontSize:15,fontColor:"#000000"}},tooltips:{position:"nearest",mode:"index",intersect:false,callbacks:{label:function(o,p){return a._EPYTA_.moneyFormat(o.yLabel)},title:function(o,p){return moment(o[0].xLabel).format("LL")}}},scales:{xAxes:[{type:"time",time:{unit:"day",unitStepSize:1,displayFormats:{day:"MMM DD"}},display:true,scaleLabel:{display:true,labelString:"Date",fontSize:15,fontColor:"#000000"},ticks:{major:{fontStyle:"bold",fontColor:"#000000"}}}],yAxes:[{display:true,scaleLabel:{display:true,labelString:"Revenue",fontSize:15,fontColor:"#000000"},ticks:{callback:function(q,p,o){return a._EPYTA_.moneyFormat(q)}}}]}}};Chart.defaults.global.defaultFontFamily="'Segoe UI', Roboto, 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif";var i=new Chart(j,m)}},error:function(k,i,j){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}});b(".ytvi-btn-logout").on("click",function(){var j="";var i=b(".iab-cat-tags").val();if(i.length>0&&i.split(",").length>1){j=" (Note: If you selected more than one video category, you must stay logged in to this settings page for your categories to automatically add variety to your ads)"}alertify.confirm().set({title:"Logout of Monetize settings",message:"Logging out won't delete your settings. However, it will require you or any other admins to re-login to change vi ad settings in the future"+j+".<br><br>To actually disable monetization, make sure the '<strong>vi ads are: On/Off</strong>' button is set to '<strong>Off</strong>.'",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_logout_ajax"},success:function(k){if(k.type==="error"){alertify.alert(k.message)}else{location.href=k.url}},error:function(m,k,l){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()})}b(".ytvi-btn-toggle").on("click",function(){var i=b(this);alertify.confirm().set({title:(i.hasClass("ytvi-btn-active")?"Turn off":"Turn on")+" your vi ads",message:i.hasClass("ytvi-btn-active")?"Are you sure you would like to deactivate your video ads? Please note that your ads will no longer appear on the front end and your revenue will be paused. If you would like them to reappear later, simply click on this button again.":"Click OK to confirm turning on your vi ads. They will appear on your site according to your <strong>Placement</strong> settings.",onok:function(){b.ajax({type:"post",dataType:"json",timeout:12000000,url:a._EPYTA_.wpajaxurl,data:{security:a._EPYTA_.security,action:"my_embedplus_vi_toggle_ajax"},success:function(j){if(j.type==="error"){alertify.alert(j.message)}else{i.find("strong").text(j.button_text);i.toggleClass("ytvi-btn-active ytvi-btn-inactive");if(i.hasClass("ytvi-btn-active")){b(".ytvi-msg-congrats").show(200)}else{b(".ytvi-msg-congrats").hide()}}},error:function(l,j,k){alertify.alert("Sorry, there was a network error. Please try again. If the issue persists, please contact ext@embedplus.com")},complete:function(){}})}}).show()});b(".ytvi-intro-video-modal").on("click",function(k){k.preventDefault();var i=Math.min(document.body.clientWidth*0.8,800);var j=9/16*i;alertify.YoutubeDialog("BcrNPnWUkVI").set({frameless:true,resizeable:true}).resizeTo(i,j)});b("#vi_show_gdpr_authorization").on("change",function(){if(b(this).is(":checked")){b(".opt_vi_show_privacy_button").show(300)}else{b(".opt_vi_show_privacy_button").hide(300)}});if(b(".wrap-ytprefs-onboarding").length){b(".ytprefs-ob-nav-close").on("click",function(){a.parent.tb_remove();a.top.location.reload()});b(".ytprefs-ob-nav-prev").on("click",function(){a._EPYTA_.onboardPrev(b(this).closest(".ytprefs-ob-step"))});b(".ytprefs-ob-filter li").hover(function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).addClass("yob-icon-visible")},function(){var i="."+b(this).find('input[type="checkbox"]').data("obfilter")+"-icon";b(i).removeClass("yob-icon-visible")});b('.ytprefs-ob-filter input[type="checkbox"]').on("change",function(){var i=b(this);var j=i.data("obfilter");var k=b('.ytprefs-ob-filter input[type="checkbox"]:checked');if(k.length&&!(k.length===1&&k.is('[data-obfilter="yob-monetize"]'))){b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",false)}else{b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").prop("disabled",true)}if(j=="yob-monetize"){b(".ytprefs-ob-step3 .ytprefs-ob-nav-ultimate, .ytprefs-ob-step3 .ytprefs-ob-nav-penultimate").toggleClass("ytprefs-ob-nav-hide")}else{if(i.is(":checked")){b(".ytprefs-ob-step2 ."+j).addClass(j+"-visible")}else{b(".ytprefs-ob-step2 ."+j).removeClass(j+"-visible")}}});b(".ytprefs-ob-step1 .ytprefs-ob-nav-next").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding").on("submit",function(k){k.preventDefault();(a.tinyMCE||a.tinymce).triggerSave();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})});b(".ytprefs-ob-step3 .ytprefs-ob-nav-skip").on("click",function(){a._EPYTA_.onboardNext(b(this).closest(".ytprefs-ob-step"))});b("#form-onboarding-apikey").on("submit",function(k){k.preventDefault();var i=b(this);i.find(".ytprefs-ob-nav-next").prop("disabled",true);var j=i.ytprefsFormJSON();j.security=a._EPYTA_.security;b.ajax({type:"post",dataType:"json",timeout:30000,url:a._EPYTA_?a._EPYTA_.wpajaxurl:ajaxurl,data:j,success:function(l){if(l.type=="success"){if(i.find(".ytprefs-ob-nav-ultimate").hasClass("ytprefs-ob-nav-hide")){a._EPYTA_.onboardNext(i.closest(".ytprefs-ob-step"))}else{a.parent.tb_remove();a.top.location.reload()}}else{}},error:function(n,l,m){},complete:function(){i.find(".ytprefs-ob-nav-next").prop("disabled",false)}})})}});b(a).on("load",function(){if(_EPYTA_.onboarded!="1"){b(".ytprefs-onboarding-launch").trigger("click")}})})(window,jQuery);
scripts/ytprefs-wizard.js CHANGED
@@ -7,7 +7,7 @@ window._EPYTWIZ_ = window._EPYTWIZ_ || {};
7
  var $this = this,
8
  $window = $(window);
9
 
10
- $window.scroll(function (e)
11
  {
12
  if ($window.scrollTop() > pos)
13
  {
@@ -93,7 +93,7 @@ window._EPYTWIZ_ = window._EPYTWIZ_ || {};
93
  },
94
  heightStyle: "content",
95
  autoHeight: false
96
- }).find('h3.header-go').click(function ()
97
  {
98
  window.open($(this).find('a').attr('href'), '_blank');
99
  return false;
@@ -104,7 +104,7 @@ window._EPYTWIZ_ = window._EPYTWIZ_ || {};
104
 
105
  if (window._EPYTWIZ_.acc_expand)
106
  {
107
- $('.wiz-accordion #' + window._EPYTWIZ_.acc_expand).click();
108
  }
109
 
110
  $('form.wizform').each(function ()
7
  var $this = this,
8
  $window = $(window);
9
 
10
+ $window.on('scroll', function (e)
11
  {
12
  if ($window.scrollTop() > pos)
13
  {
93
  },
94
  heightStyle: "content",
95
  autoHeight: false
96
+ }).find('h3.header-go').on('click', function ()
97
  {
98
  window.open($(this).find('a').attr('href'), '_blank');
99
  return false;
104
 
105
  if (window._EPYTWIZ_.acc_expand)
106
  {
107
+ $('.wiz-accordion #' + window._EPYTWIZ_.acc_expand).trigger('click');
108
  }
109
 
110
  $('form.wizform').each(function ()
scripts/ytprefs-wizard.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- window._EPYTWIZ_=window._EPYTWIZ_||{};(function(a){a.fn.followTo=function(e,b){var c=this,d=a(window);d.scroll(function(f){if(d.scrollTop()>e){c.css({position:"absolute",top:e})}else{c.css({position:"fixed",top:b})}})};window._EPYTWIZ_.getUrlParameter=function(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var d=new RegExp("[\\?&]"+b+"=([^&#]*)");var c=d.exec(window.location.search);return c===null?"":decodeURIComponent(c[1].replace(/\+/g," "))};window._EPYTWIZ_.selectText=window._EPYTWIZ_.selectText||function(d){if(document.selection){var b=document.body.createTextRange();b.moveToElementText(d);b.select()}else{if(window.getSelection){var c=window.getSelection();var b=document.createRange();b.selectNode(d);c.removeAllRanges();c.addRange(b)}}};window._EPYTWIZ_.loadmovieplain=window._EPYTWIZ_.loadmovieplain||function(b){var c='<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?autoplay=1" frameborder="0" allowfullscreen ></iframe>';c=c.replace(/~ytid/g,b);a("#watch"+b).html(c);a("#closeme"+b).css("display","inline");a("#moviecontainer"+b).css("display","block");if(document.getElementById("scrollwatch"+b)){setTimeout(function(){a("html, body").animate({scrollTop:a("#scrollwatch"+b).offset().top-50},250,function(){})},800)}};window._EPYTWIZ_.closeme=window._EPYTWIZ_.closeme||function(b){a("#moviecontainer"+b).css("display","none");a("#watch"+b).html("")};a(document).ready(function(){a(".wiz-accordion").accordion({header:"> h3",collapsible:true,active:false,icons:{header:"ui-icon-circle-arrow-e",activeHeader:"ui-icon-circle-arrow-s"},heightStyle:"content",autoHeight:false}).find("h3.header-go").click(function(){window.open(a(this).find("a").attr("href"),"_blank");return false});a(".playlist-tabs").tabs();a(".livestream-tabs").tabs();if(window._EPYTWIZ_.acc_expand){a(".wiz-accordion #"+window._EPYTWIZ_.acc_expand).click()}a("form.wizform").each(function(){$thisForm=a(this);$thisForm.find(".txturlpastecustom").on("paste",function(){$thisTxtUrl=a(this);setTimeout(function(){var d=a.trim($thisTxtUrl.val());var c=/<.*/i;if(c.test(d)){var e=new RegExp("(?:https?://)?(?:www\\.)?(?:youtu\\.be/|youtube\\.com(?:/embed/|/v/|/watch\\?v=))([\\w-]{10,12})","ig");var f=e.exec(d);if(f){var g=f[1];$thisTxtUrl.val("https://www.youtube.com/watch?v="+g)}else{$thisTxtUrl.val("https://www.youtube.com/watch?v=")}$thisForm.find(".badpaste").show()}else{$thisForm.find(".badpaste").hide()}},100)})});var b=a("#epyt_wiz_wrap");b.on("click",".copycode",function(){window._EPYTWIZ_.selectText(this)});b.on("click",".inserttopost",function(){var d=window.location.toString().split("/")[0]+"//"+window.location.toString().split("/")[2];var e=a(this).attr("rel");var c=window._EPYTWIZ_.getUrlParameter("clientId");parent.postMessage("youtubeembedplus|"+e+(c?"|clientId="+c:""),d)});b.on("click",".resultdiv .load-movie",function(){window._EPYTWIZ_.loadmovieplain(a(this).closest(".resultdiv").data("vid"));return false});b.on("click",".moviecontainer a.closeme",function(){window._EPYTWIZ_.closeme(a(this).data("vid"))})})})(jQuery);
1
 
2
+ window._EPYTWIZ_=window._EPYTWIZ_||{};(function(a){a.fn.followTo=function(e,b){var c=this,d=a(window);d.on("scroll",function(f){if(d.scrollTop()>e){c.css({position:"absolute",top:e})}else{c.css({position:"fixed",top:b})}})};window._EPYTWIZ_.getUrlParameter=function(b){b=b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var d=new RegExp("[\\?&]"+b+"=([^&#]*)");var c=d.exec(window.location.search);return c===null?"":decodeURIComponent(c[1].replace(/\+/g," "))};window._EPYTWIZ_.selectText=window._EPYTWIZ_.selectText||function(d){if(document.selection){var b=document.body.createTextRange();b.moveToElementText(d);b.select()}else{if(window.getSelection){var c=window.getSelection();var b=document.createRange();b.selectNode(d);c.removeAllRanges();c.addRange(b)}}};window._EPYTWIZ_.loadmovieplain=window._EPYTWIZ_.loadmovieplain||function(b){var c='<iframe width="600" height="368" src="//www.youtube.com/embed/~ytid?autoplay=1" frameborder="0" allowfullscreen ></iframe>';c=c.replace(/~ytid/g,b);a("#watch"+b).html(c);a("#closeme"+b).css("display","inline");a("#moviecontainer"+b).css("display","block");if(document.getElementById("scrollwatch"+b)){setTimeout(function(){a("html, body").animate({scrollTop:a("#scrollwatch"+b).offset().top-50},250,function(){})},800)}};window._EPYTWIZ_.closeme=window._EPYTWIZ_.closeme||function(b){a("#moviecontainer"+b).css("display","none");a("#watch"+b).html("")};a(document).ready(function(){a(".wiz-accordion").accordion({header:"> h3",collapsible:true,active:false,icons:{header:"ui-icon-circle-arrow-e",activeHeader:"ui-icon-circle-arrow-s"},heightStyle:"content",autoHeight:false}).find("h3.header-go").on("click",function(){window.open(a(this).find("a").attr("href"),"_blank");return false});a(".playlist-tabs").tabs();a(".livestream-tabs").tabs();if(window._EPYTWIZ_.acc_expand){a(".wiz-accordion #"+window._EPYTWIZ_.acc_expand).trigger("click")}a("form.wizform").each(function(){$thisForm=a(this);$thisForm.find(".txturlpastecustom").on("paste",function(){$thisTxtUrl=a(this);setTimeout(function(){var d=a.trim($thisTxtUrl.val());var c=/<.*/i;if(c.test(d)){var e=new RegExp("(?:https?://)?(?:www\\.)?(?:youtu\\.be/|youtube\\.com(?:/embed/|/v/|/watch\\?v=))([\\w-]{10,12})","ig");var f=e.exec(d);if(f){var g=f[1];$thisTxtUrl.val("https://www.youtube.com/watch?v="+g)}else{$thisTxtUrl.val("https://www.youtube.com/watch?v=")}$thisForm.find(".badpaste").show()}else{$thisForm.find(".badpaste").hide()}},100)})});var b=a("#epyt_wiz_wrap");b.on("click",".copycode",function(){window._EPYTWIZ_.selectText(this)});b.on("click",".inserttopost",function(){var d=window.location.toString().split("/")[0]+"//"+window.location.toString().split("/")[2];var e=a(this).attr("rel");var c=window._EPYTWIZ_.getUrlParameter("clientId");parent.postMessage("youtubeembedplus|"+e+(c?"|clientId="+c:""),d)});b.on("click",".resultdiv .load-movie",function(){window._EPYTWIZ_.loadmovieplain(a(this).closest(".resultdiv").data("vid"));return false});b.on("click",".moviecontainer a.closeme",function(){window._EPYTWIZ_.closeme(a(this).data("vid"))})})})(jQuery);
scripts/ytprefs.js CHANGED
@@ -145,11 +145,11 @@
145
 
146
  if ($nextvid.length)
147
  {
148
- $nextvid.click();
149
  }
150
  else
151
  {
152
- $gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click();
153
 
154
  }
155
  }
@@ -404,7 +404,7 @@
404
  if ((code === 13) || (code === 32))
405
  {
406
  e.preventDefault();
407
- $(this).click();
408
 
409
  }
410
  });
@@ -460,7 +460,7 @@
460
 
461
  if ($container.find('.epyt-pagebutton').first().data('autonext') == '1' && !humanClick)
462
  {
463
- $container.find('.epyt-gallery-thumb').first().click();
464
  }
465
 
466
  })
145
 
146
  if ($nextvid.length)
147
  {
148
+ $nextvid.trigger('click');
149
  }
150
  else
151
  {
152
+ $gallery.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().trigger('click');
153
 
154
  }
155
  }
404
  if ((code === 13) || (code === 32))
405
  {
406
  e.preventDefault();
407
+ $(this).trigger('click');
408
 
409
  }
410
  });
460
 
461
  if ($container.find('.epyt-pagebutton').first().data('autonext') == '1' && !humanClick)
462
  {
463
+ $container.find('.epyt-gallery-thumb').first().trigger('click');
464
  }
465
 
466
  })
scripts/ytprefs.min.js CHANGED
@@ -1,2 +1,2 @@
1
 
2
- (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",eppath:"/wp-content/plugins/youtube-embed-plus/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true,ytapi_load:"light",pause_others:false};a._EPYT_.touchmoved=false;a._EPYT_.apiVideos=a._EPYT_.apiVideos||{};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(h){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var f=parseInt(h.target.getIframe().getAttribute("data-vol"));if(!isNaN(f)){if(f===0){h.target.mute()}else{if(h.target.isMuted()){h.target.unMute()}h.target.setVolume(f)}}}var e=parseInt(h.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(e)&&e===1){h.target.playVideo()}}catch(g){}try{var d=h.target.getIframe().getAttribute("id");a._EPYT_.apiVideos[d]=h.target}catch(c){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(a._EPYT_.pause_others&&f.data===a.YT.PlayerState.PLAYING){a._EPADashboard_.pauseOthers(f.target)}if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}if(f.data===a.YT.PlayerState.ENDED&&b(e).data("relstop")=="1"){if(typeof f.target.stopVideo==="function"){f.target.stopVideo()}else{var g=b(e).clone(true).off();g.attr("src",a._EPADashboard_.cleanSrc(g.attr("src").replace("autoplay=1","autoplay=0")));b(e).replaceWith(g);a._EPADashboard_.setupevents(g.attr("id"));e=g.get(0)}}var c=b(e).closest(".epyt-gallery");if(!c.length){c=b("#"+b(e).data("epytgalleryid"))}if(c.length){var d=c.find(".epyt-pagebutton").first().data("autonext")=="1";if(d&&f.data===a.YT.PlayerState.ENDED){var h=c.find(".epyt-current-video");if(!h.length){h=c.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.click()}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().click()}}}},isMobile:function(){return/Mobi|Android/i.test(navigator.userAgent)},videoEqual:function(d,c){if(d.getIframe&&c.getIframe&&d.getIframe().id===c.getIframe().id){return true}return false},pauseOthers:function(e){if(!e){return}for(var d in a._EPYT_.apiVideos){var c=a._EPYT_.apiVideos[d];if(c&&typeof c.pauseVideo==="function"&&c!=e&&!_EPADashboard_.videoEqual(c,e)&&typeof c.getPlayerState==="function"&&[YT.PlayerState.BUFFERING,a.YT.PlayerState.PLAYING].indexOf(c.getPlayerState())>=0){c.pauseVideo()}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(e){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(e);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+e);c.epytsetupdone=true;var d={events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}};return new a.YT.Player(e,d)}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",a._EPADashboard_.cleanSrc(d));c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},cleanSrc:function(d){var c=d.replace("enablejsapi=1?enablejsapi=1","enablejsapi=1");return c},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"], iframe[data-src*="youtube.com/embed/"]').length)){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}},pageReady:function(){b(".epyt-gallery").each(function(){var f=b(this);if(!f.data("epytevents")||!b("body").hasClass("block-editor-page")){f.data("epytevents","1");var e=b(this).find("iframe, div.__youtube_prefs_gdpr__").first();var c=e.data("src")||e.attr("src");if(!c){c=e.data("ep-src")}var d=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");if(typeof(c)!=="undefined"){c=c.replace(d,"GALLERYVIDEOID");f.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){f.data("ep-gallerysrc","")}}f.on("click touchend",".epyt-gallery-list .epyt-gallery-thumb",function(k){e=f.find("iframe, div.__youtube_prefs_gdpr__").first();if(a._EPYT_.touchmoved){return}if(!b(this).hasClass("epyt-current-video")){f.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var g=b(this).data("videoid");f.data("currvid",g);var l=f.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(l.indexOf("autoplay")>0){l=l.replace("autoplay=0","autoplay=1")}else{l+="&autoplay=1"}e.addClass("epyt-thumbplay")}var h=Math.max(b("body").scrollTop(),b("html").scrollTop());var i=e.offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(h>i){b("html, body").animate({scrollTop:i},500,function(){a._EPADashboard_.setVidSrc(e,l)})}else{a._EPADashboard_.setVidSrc(e,l)}}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(h){var g=h.which;if((g===13)||(g===32)){h.preventDefault();b(this).click()}});f.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});f.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});f.on("click touchend",".epyt-pagebutton",function(k){if(a._EPYT_.touchmoved){return}if(!f.find(".epyt-gallery-list").hasClass("epyt-loading")){f.find(".epyt-gallery-list").addClass("epyt-loading");var g=typeof(k.originalEvent)!=="undefined";var j={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("epcolumns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),thumbplay:b(this).data("thumbplay")}};var h=b(this).hasClass("epyt-next");var i=parseInt(f.data("currpage")+"");i+=h?1:-1;f.data("currpage",i);b.post(_EPYT_.ajaxurl,j,function(l){f.find(".epyt-gallery-list").html(l);f.find(".epyt-current").each(function(){b(this).text(f.data("currpage"))});f.find('.epyt-gallery-thumb[data-videoid="'+f.data("currvid")+'"]').addClass("epyt-current-video");if(f.find(".epyt-pagebutton").first().data("autonext")=="1"&&!g){f.find(".epyt-gallery-thumb").first().click()}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){f.find(".epyt-gallery-list").removeClass("epyt-loading");if(f.find(".epyt-pagebutton").first().data("autonext")!="1"){var l=Math.max(b("body").scrollTop(),b("html").scrollTop());var m=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(l>m){b("html, body").animate({scrollTop:m},500)}}})}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false})}});b("button.__youtube_prefs_gdpr__").on("click",function(c){c.preventDefault();if(b.cookie){b.cookie("ytprefs_gdpr_consent","1",{expires:30,path:"/"});a.top.location.reload()}})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};a._EPADashboard_.loadYTAPI();if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();a._EPADashboard_.loadYTAPI();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(d,f,c){if(f&&f.responseText&&f.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
1
 
2
+ (function(a,b){a._EPYT_=a._EPYT_||{ajaxurl:"/wp-admin/admin-ajax.php",security:"",gallery_scrolloffset:100,eppathtoscripts:"/wp-content/plugins/youtube-embed-plus/scripts/",eppath:"/wp-content/plugins/youtube-embed-plus/",epresponsiveselector:["iframe.__youtube_prefs_widget__"],epdovol:true,evselector:'iframe.__youtube_prefs__[src], iframe[src*="youtube.com/embed/"], iframe[src*="youtube-nocookie.com/embed/"]',stopMobileBuffer:true,ajax_compat:false,usingdefault:true,ytapi_load:"light",pause_others:false};a._EPYT_.touchmoved=false;a._EPYT_.apiVideos=a._EPYT_.apiVideos||{};if(a.location.toString().indexOf("https://")===0){a._EPYT_.ajaxurl=a._EPYT_.ajaxurl.replace("http://","https://")}a._EPYT_.pageLoaded=false;b(a).on("load._EPYT_",function(){a._EPYT_.pageLoaded=true});if(!document.querySelectorAll){document.querySelectorAll=function(d){var f=document,e=f.documentElement.firstChild,c=f.createElement("STYLE");e.appendChild(c);f.__qsaels=[];c.styleSheet.cssText=d+"{x:expression(document.__qsaels.push(this))}";a.scrollBy(0,0);return f.__qsaels}}if(typeof a._EPADashboard_==="undefined"){a._EPADashboard_={initStarted:false,checkCount:0,onPlayerReady:function(h){try{if(typeof _EPYT_.epdovol!=="undefined"&&_EPYT_.epdovol){var f=parseInt(h.target.getIframe().getAttribute("data-vol"));if(!isNaN(f)){if(f===0){h.target.mute()}else{if(h.target.isMuted()){h.target.unMute()}h.target.setVolume(f)}}}var e=parseInt(h.target.getIframe().getAttribute("data-epautoplay"));if(!isNaN(e)&&e===1){h.target.playVideo()}}catch(g){}try{var d=h.target.getIframe().getAttribute("id");a._EPYT_.apiVideos[d]=h.target}catch(c){}},onPlayerStateChange:function(f){var e=f.target.getIframe();if(a._EPYT_.pause_others&&f.data===a.YT.PlayerState.PLAYING){a._EPADashboard_.pauseOthers(f.target)}if(f.data===a.YT.PlayerState.PLAYING&&f.target.ponce!==true&&e.src.indexOf("autoplay=1")===-1){f.target.ponce=true}if(f.data===a.YT.PlayerState.ENDED&&b(e).data("relstop")=="1"){if(typeof f.target.stopVideo==="function"){f.target.stopVideo()}else{var g=b(e).clone(true).off();g.attr("src",a._EPADashboard_.cleanSrc(g.attr("src").replace("autoplay=1","autoplay=0")));b(e).replaceWith(g);a._EPADashboard_.setupevents(g.attr("id"));e=g.get(0)}}var c=b(e).closest(".epyt-gallery");if(!c.length){c=b("#"+b(e).data("epytgalleryid"))}if(c.length){var d=c.find(".epyt-pagebutton").first().data("autonext")=="1";if(d&&f.data===a.YT.PlayerState.ENDED){var h=c.find(".epyt-current-video");if(!h.length){h=c.find(".epyt-gallery-thumb").first()}var i=h.find(" ~ .epyt-gallery-thumb").first();if(i.length){i.trigger("click")}else{c.find('.epyt-pagebutton.epyt-next[data-pagetoken!=""][data-pagetoken]').first().trigger("click")}}}},isMobile:function(){return/Mobi|Android/i.test(navigator.userAgent)},videoEqual:function(d,c){if(d.getIframe&&c.getIframe&&d.getIframe().id===c.getIframe().id){return true}return false},pauseOthers:function(e){if(!e){return}for(var d in a._EPYT_.apiVideos){var c=a._EPYT_.apiVideos[d];if(c&&typeof c.pauseVideo==="function"&&c!=e&&!_EPADashboard_.videoEqual(c,e)&&typeof c.getPlayerState==="function"&&[YT.PlayerState.BUFFERING,a.YT.PlayerState.PLAYING].indexOf(c.getPlayerState())>=0){c.pauseVideo()}}},justid:function(c){return new RegExp("[\\?&]v=([^&#]*)").exec(c)[1]},setupevents:function(e){if(typeof(a.YT)!=="undefined"&&a.YT!==null&&a.YT.loaded){var c=document.getElementById(e);if(!c.epytsetupdone){a._EPADashboard_.log("Setting up YT API events: "+e);c.epytsetupdone=true;var d={events:{onReady:a._EPADashboard_.onPlayerReady,onStateChange:a._EPADashboard_.onPlayerStateChange}};return new a.YT.Player(e,d)}}},apiInit:function(){if(typeof(a.YT)!=="undefined"){a._EPADashboard_.initStarted=true;var c=document.querySelectorAll(_EPYT_.evselector);for(var d=0;d<c.length;d++){if(!c[d].hasAttribute("id")){c[d].id="_dytid_"+Math.round(Math.random()*8999+1000)}a._EPADashboard_.setupevents(c[d].id)}}},log:function(d){try{console.log(d)}catch(c){}},doubleCheck:function(){a._EPADashboard_.checkInterval=setInterval(function(){a._EPADashboard_.checkCount++;if(a._EPADashboard_.checkCount>=5||a._EPADashboard_.initStarted){clearInterval(a._EPADashboard_.checkInterval)}else{a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API init check")}},1000)},selectText:function(e){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(a.getSelection){var d=a.getSelection();var c=document.createRange();c.selectNode(e);d.removeAllRanges();d.addRange(c)}}},setVidSrc:function(c,d){c.attr("src",a._EPADashboard_.cleanSrc(d));c.get(0).epytsetupdone=false;a._EPADashboard_.setupevents(c.attr("id"))},cleanSrc:function(d){var c=d.replace("enablejsapi=1?enablejsapi=1","enablejsapi=1");return c},loadYTAPI:function(){if(typeof a.YT==="undefined"){if(a._EPYT_.ytapi_load!=="never"&&(a._EPYT_.ytapi_load==="always"||b('iframe[src*="youtube.com/embed/"], iframe[data-src*="youtube.com/embed/"]').length)){var c=document.createElement("script");c.src="https://www.youtube.com/iframe_api";c.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(c)}}else{if(a.YT.loaded){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API available 2")})}}}},pageReady:function(){b(".epyt-gallery").each(function(){var f=b(this);if(!f.data("epytevents")||!b("body").hasClass("block-editor-page")){f.data("epytevents","1");var e=b(this).find("iframe, div.__youtube_prefs_gdpr__").first();var c=e.data("src")||e.attr("src");if(!c){c=e.data("ep-src")}var d=b(this).find(".epyt-gallery-list .epyt-gallery-thumb").first().data("videoid");if(typeof(c)!=="undefined"){c=c.replace(d,"GALLERYVIDEOID");f.data("ep-gallerysrc",c)}else{if(e.hasClass("__youtube_prefs_gdpr__")){f.data("ep-gallerysrc","")}}f.on("click touchend",".epyt-gallery-list .epyt-gallery-thumb",function(k){e=f.find("iframe, div.__youtube_prefs_gdpr__").first();if(a._EPYT_.touchmoved){return}if(!b(this).hasClass("epyt-current-video")){f.find(".epyt-gallery-list .epyt-gallery-thumb").removeClass("epyt-current-video");b(this).addClass("epyt-current-video");var g=b(this).data("videoid");f.data("currvid",g);var l=f.data("ep-gallerysrc").replace("GALLERYVIDEOID",g);var j=f.find(".epyt-pagebutton").first().data("thumbplay");if(j!=="0"&&j!==0){if(l.indexOf("autoplay")>0){l=l.replace("autoplay=0","autoplay=1")}else{l+="&autoplay=1"}e.addClass("epyt-thumbplay")}var h=Math.max(b("body").scrollTop(),b("html").scrollTop());var i=e.offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(h>i){b("html, body").animate({scrollTop:i},500,function(){a._EPADashboard_.setVidSrc(e,l)})}else{a._EPADashboard_.setVidSrc(e,l)}}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false}).on("keydown",".epyt-gallery-list .epyt-gallery-thumb, .epyt-pagebutton",function(h){var g=h.which;if((g===13)||(g===32)){h.preventDefault();b(this).trigger("click")}});f.on("mouseenter",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).addClass("hover")});f.on("mouseleave",".epyt-gallery-list .epyt-gallery-thumb",function(){b(this).removeClass("hover")});f.on("click touchend",".epyt-pagebutton",function(k){if(a._EPYT_.touchmoved){return}if(!f.find(".epyt-gallery-list").hasClass("epyt-loading")){f.find(".epyt-gallery-list").addClass("epyt-loading");var g=typeof(k.originalEvent)!=="undefined";var j={action:"my_embedplus_gallery_page",security:_EPYT_.security,options:{playlistId:b(this).data("playlistid"),pageToken:b(this).data("pagetoken"),pageSize:b(this).data("pagesize"),columns:b(this).data("epcolumns"),showTitle:b(this).data("showtitle"),showPaging:b(this).data("showpaging"),autonext:b(this).data("autonext"),thumbplay:b(this).data("thumbplay")}};var h=b(this).hasClass("epyt-next");var i=parseInt(f.data("currpage")+"");i+=h?1:-1;f.data("currpage",i);b.post(_EPYT_.ajaxurl,j,function(l){f.find(".epyt-gallery-list").html(l);f.find(".epyt-current").each(function(){b(this).text(f.data("currpage"))});f.find('.epyt-gallery-thumb[data-videoid="'+f.data("currvid")+'"]').addClass("epyt-current-video");if(f.find(".epyt-pagebutton").first().data("autonext")=="1"&&!g){f.find(".epyt-gallery-thumb").first().trigger("click")}}).fail(function(){alert("Sorry, there was an error loading the next page.")}).always(function(){f.find(".epyt-gallery-list").removeClass("epyt-loading");if(f.find(".epyt-pagebutton").first().data("autonext")!="1"){var l=Math.max(b("body").scrollTop(),b("html").scrollTop());var m=f.find(".epyt-gallery-list").offset().top-parseInt(_EPYT_.gallery_scrolloffset);if(l>m){b("html, body").animate({scrollTop:m},500)}}})}}).on("touchmove",function(g){a._EPYT_.touchmoved=true}).on("touchstart",function(){a._EPYT_.touchmoved=false})}});b("button.__youtube_prefs_gdpr__").on("click",function(c){c.preventDefault();if(b.cookie){b.cookie("ytprefs_gdpr_consent","1",{expires:30,path:"/"});a.top.location.reload()}})}}}a.onYouTubeIframeAPIReady=typeof a.onYouTubeIframeAPIReady!=="undefined"?a.onYouTubeIframeAPIReady:function(){if(a._EPYT_.pageLoaded){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready")}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API ready 2")})}};a._EPADashboard_.loadYTAPI();if(a._EPYT_.pageLoaded){a._EPADashboard_.doubleCheck()}else{b(a).on("load._EPYT_",function(){a._EPADashboard_.doubleCheck()})}b(document).ready(function(){a._EPADashboard_.pageReady();a._EPADashboard_.loadYTAPI();if(a._EPYT_.ajax_compat){b(a).on("load._EPYT_",function(){b(document).ajaxSuccess(function(d,f,c){if(f&&f.responseText&&f.responseText.indexOf("<iframe ")!==-1){a._EPADashboard_.loadYTAPI();a._EPADashboard_.apiInit();a._EPADashboard_.log("YT API AJAX");a._EPADashboard_.pageReady()}})})}})})(window,jQuery);
src/block/block.js CHANGED
@@ -15,7 +15,9 @@ import "./editor.scss";
15
  const { __ } = wp.i18n; // Import __() from wp.i18n
16
  const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
17
  const { Component, Fragment } = wp.element;
18
- const { ServerSideRender, Button, Modal } = wp.components;
 
 
19
  //const { withState } = wp.compose;
20
 
21
  import debounce from "lodash/debounce";
@@ -153,7 +155,7 @@ registerBlockType("epyt/youtube", {
153
  }
154
 
155
  return (
156
- <div className="components-placeholder editor-media-placeholder wp-block-image epytblock">
157
  <div className="components-placeholder__label">
158
  <svg
159
  xmlns="http://www.w3.org/2000/svg"
@@ -198,7 +200,7 @@ registerBlockType("epyt/youtube", {
198
  </div>
199
  <div className="components-placeholder__fieldset">
200
  <div>
201
- <Button isDefault isLarge onClick={ this.showModal }>
202
  Open Wizard
203
  </Button>
204
  {this.state.show ? (
15
  const { __ } = wp.i18n; // Import __() from wp.i18n
16
  const { registerBlockType } = wp.blocks; // Import registerBlockType() from wp.blocks
17
  const { Component, Fragment } = wp.element;
18
+ const { Button, Modal } = wp.components;
19
+ const { serverSideRender: ServerSideRender } = wp;
20
+
21
  //const { withState } = wp.compose;
22
 
23
  import debounce from "lodash/debounce";
155
  }
156
 
157
  return (
158
+ <div className="components-placeholder is-large editor-media-placeholder wp-block-image epytblock">
159
  <div className="components-placeholder__label">
160
  <svg
161
  xmlns="http://www.w3.org/2000/svg"
200
  </div>
201
  <div className="components-placeholder__fieldset">
202
  <div>
203
+ <Button isPrimary onClick={ this.showModal }>
204
  Open Wizard
205
  </Button>
206
  {this.state.show ? (
styles/ytprefs-wizard.css CHANGED
@@ -68,7 +68,7 @@ input.ui-widget[type=text] {
68
  display: inline-block;
69
  position: relative;
70
  left: auto;
71
- margin: -.25em 0 0 0;
72
  }
73
 
74
  .ui-button .ui-icon {
68
  display: inline-block;
69
  position: relative;
70
  left: auto;
71
+ margin: 0;
72
  }
73
 
74
  .ui-button .ui-icon {
styles/ytprefs-wizard.min.css CHANGED
@@ -1,2 +1,2 @@
1
 
2
- #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#screen-meta-links{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-widget .ui-widget li{font-size:13px}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px;line-height:2}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold;line-height:2}#epyt_wiz_wrap .ui-icon{display:inline-block;position:relative;left:auto;margin:-.25em 0 0 0}.ui-button .ui-icon{transform:scale(1.35,1.35);display:inline-block}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .resulttitle{font-weight:bold}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px;clear:both}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-weight:bold;font-size:50px;cursor:pointer}.epyt-search-results .resulttitle .ui-icon{transform:scale(1.35,1.35)}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px;display:none}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.ui-tabs .ui-tabs-anchor{font-weight:bold}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{clear:both;float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}.h3_vi_monetize-content{background-color:#f0f0f0}#wpwrap .ep-wizard-preview-video-wrapper{position:relative;padding-top:56.25%;width:100%}#wpwrap .ep-wizard-preview-video-wrapper iframe{width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0}
1
 
2
+ #wphead{display:none}#wpbody{margin-left:0}#adminmenuback{display:none}#adminmenu,adminmenuwrap{display:none}#wpcontent,.auto-fold #wpcontent{margin-left:0}#wpadminbar{display:none}html.wp-toolbar{padding:0}#footer,#wpfooter,.auto-fold #wpfooter{display:none}#screen-meta-links{display:none}#wpfooter{clear:both}.clearboth{clear:both}.pad20{padding:20px}.center{text-align:center}.bold{font-weight:bold}.orange{color:#f85d00}.smallnote{font-size:small;font-style:italic}.ui-widget,.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:inherit}.ui-widget .ui-widget li{font-size:13px}.ui-accordion .ui-accordion-header{margin-top:15px;font-weight:bold}.ui-accordion .ui-accordion-content.header-go-content{display:none!important;height:0!important}.ui-widget-content a{color:#0073aa}input.ui-widget[type=text]{margin:0;padding:.4em 1em;width:450px;line-height:2}.txt-button-align input.ui-widget[type=text],.txt-button-align button{vertical-align:top}#epyt_wiz_wrap .ui-button{font-weight:bold;line-height:2}#epyt_wiz_wrap .ui-icon{display:inline-block;position:relative;left:auto;margin:0}.ui-button .ui-icon{transform:scale(1.35,1.35);display:inline-block}.copycode{background-color:#eef;border:2px solid #c7d6e4;display:inline-block;font-size:.9em;overflow-x:hidden;vertical-align:middle;white-space:nowrap;width:400px;padding-left:15px;padding-right:15px}.pointer{cursor:pointer}.relative{position:relative}.epyt-search-results a.pointer.thumb.load-movie{float:left;width:160px;height:90px;background-position:center;background-size:cover;display:block;margin:0 25px 10px 0}.epyt-search-results .resultdiv{margin-bottom:40px}.epyt-search-results .resultinfo{text-align:left}.epyt-search-results .resulttitle{font-weight:bold}.epyt-search-results .moviecontainer{margin-bottom:40px;margin-top:-30px;clear:both}.epyt-search-results .closeme{right:110px;top:-10px;position:absolute;font-weight:bold;font-size:50px;cursor:pointer}.epyt-search-results .resulttitle .ui-icon{transform:scale(1.35,1.35)}.epyt-pagination{clear:both;text-align:center;padding:10px 8px 10px 8px;display:none}.epyt-pagination>div,.epyt-pagenumbers>div{display:inline-block;padding:0 2px 0 2px;vertical-align:middle}.epyt-pagination .epyt-pagebutton{cursor:pointer;display:inline-block;padding:0 10px 0 10px}.epyt-pagebutton>div{display:inline}.epyt-pagination .epyt-loader{display:none}.epyt-gallery-list.epyt-loading .epyt-pagination .epyt-loader{display:inline-block}.epyt-pagebutton.hide,.epyt-pagenumbers.hide{display:none!important;opacity:0!important;visibility:hidden!important}.ui-tabs .ui-tabs-anchor{font-weight:bold}.playlist-tabs{margin-bottom:20px}.icon-playlist{float:left;height:auto;margin:15px 30px 0 0;max-width:150px}a.ythealth{clear:both;float:right;margin-top:15px;position:relative}a.ythealth .tip{position:absolute;width:450px;right:0;top:-100px;display:none;background-color:#fff;padding:20px;border:2px solid #ddd;border-radius:5px}a.ythealth:hover .tip{display:block}.h3_vi_monetize-content{background-color:#f0f0f0}#wpwrap .ep-wizard-preview-video-wrapper{position:relative;padding-top:56.25%;width:100%}#wpwrap .ep-wizard-preview-video-wrapper iframe{width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0}
youtube.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
- Version: 13.4.1.2
7
  Author: Embed Plus for YouTube Team
8
  Author URI: https://www.embedplus.com
9
  */
@@ -34,7 +34,7 @@ class YouTubePrefs
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
- public static $version = '13.4.1.2';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
@@ -411,7 +411,7 @@ class YouTubePrefs
411
  {
412
 
413
 
414
- $j('.acctitle').click(function ()
415
  {
416
  var $acctitle = $j(this);
417
  var $accbox = $j(this).parent().children('.accbox');
@@ -1057,7 +1057,7 @@ class YouTubePrefs
1057
  <div class="clearboth" style="height: 10px;">
1058
  </div>
1059
  <p>
1060
- If you see a black/empty YouTube player, then it's likely that your channel is not yet approved by YouTube/Google for embedding live streams. You can live stream and have viewers watch directly on YouTube.com, but embedding the live stream on your own site requires meeting thresholds <a href="https://www.embedplus.com/how-to-embed-a-youtube-livestream-in-wordpress.aspx" target="_blank">described here</a>.
1061
  </p>
1062
  <div class="ep-wizard-preview-video-wrapper">
1063
  <iframe src="https://www.youtube.com/embed/live_stream?channel=<?php echo esc_attr($thechannelid) ?>" allowfullscreen="" frameborder="0"></iframe>
@@ -1747,7 +1747,7 @@ class YouTubePrefs
1747
  {
1748
  $(document).ready(function ()
1749
  {
1750
- $('.epxout').click(function ()
1751
  {
1752
  $.ajax({
1753
  type: "post",
@@ -3109,8 +3109,8 @@ class YouTubePrefs
3109
  if (response.type === "success")
3110
  {
3111
  $j(response.container).append(response.data);
3112
- $j(".ytprefs_glance_button").click(widen_ytprefs_glance);
3113
- $j(window).resize(widen_ytprefs_glance);
3114
  if (typeof ep_do_pointers === 'function')
3115
  {
3116
  //ep_do_pointers($j);
@@ -3182,7 +3182,7 @@ class YouTubePrefs
3182
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
3183
 
3184
  $new_pointer_content .= '<p>'; // ooopointer
3185
- $new_pointer_content .= "This update allows you to specify the default language (when available) that the player will use to display closed captions, for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>.";
3186
  if (self::vi_logged_in())
3187
  {
3188
  $new_pointer_content .= "<br><br><strong>Note:</strong> You are currently logged into the vi intelligence feature. vi support is being deprecated in the next version, so we recommend taking the vi ads down from your site. Please contact ext@embedplus.com for questions.";
@@ -4713,7 +4713,7 @@ class YouTubePrefs
4713
  {
4714
  alertify.alert(alertmessage);
4715
  var tabSelector = '.wrap-ytprefs .nav-tab-wrapper .nav-tab[href=#' + $tabFocus.attr('id') + ']';
4716
- $(tabSelector).click();
4717
  }
4718
  if (!$formDefaults.find('#ajax_save').is(':checked'))
4719
  {
@@ -4780,7 +4780,7 @@ class YouTubePrefs
4780
  {
4781
  window.scrollTo(0, 0);
4782
  }, 1);
4783
- $('.wrap-ytprefs .nav-tab-wrapper a[href="' + window.location.hash + '"]').click();
4784
  }
4785
 
4786
  $('#ytform').on('submit', function (e)
@@ -4788,7 +4788,7 @@ class YouTubePrefs
4788
  return window.savevalidate(e);
4789
  });
4790
 
4791
- jQuery('#<?php echo self::$opt_defaultdims; ?>').change(function ()
4792
  {
4793
  if (jQuery(this).is(":checked"))
4794
  {
@@ -4800,7 +4800,7 @@ class YouTubePrefs
4800
  }
4801
 
4802
  });
4803
- jQuery('#<?php echo self::$opt_gallery_customarrows; ?>').change(function ()
4804
  {
4805
  if (jQuery(this).is(":checked"))
4806
  {
@@ -4812,7 +4812,7 @@ class YouTubePrefs
4812
  }
4813
 
4814
  });
4815
- jQuery('#<?php echo self::$opt_gallery_collapse_grid; ?>').change(function ()
4816
  {
4817
  if (jQuery(this).is(":checked"))
4818
  {
@@ -4823,7 +4823,7 @@ class YouTubePrefs
4823
  jQuery("#box_collapse_grid").hide(500);
4824
  }
4825
  });
4826
- jQuery('#<?php echo self::$opt_restrict_wizard; ?>').change(function ()
4827
  {
4828
  if (jQuery(this).is(":checked"))
4829
  {
@@ -4835,7 +4835,7 @@ class YouTubePrefs
4835
  }
4836
  });
4837
 
4838
- jQuery('#<?php echo self::$opt_gallery_channelsub; ?>').change(function ()
4839
  {
4840
  if (jQuery(this).is(":checked"))
4841
  {
@@ -4847,7 +4847,7 @@ class YouTubePrefs
4847
  }
4848
 
4849
  });
4850
- jQuery('#<?php echo self::$opt_responsive; ?>').change(function ()
4851
  {
4852
  if (jQuery(this).is(":checked"))
4853
  {
@@ -4858,7 +4858,7 @@ class YouTubePrefs
4858
  jQuery("#boxresponsive_all").hide(500);
4859
  }
4860
  });
4861
- jQuery('#<?php echo self::$opt_migrate; ?>').change(function ()
4862
  {
4863
  if (jQuery(this).is(":checked"))
4864
  {
@@ -4869,7 +4869,7 @@ class YouTubePrefs
4869
  jQuery("#boxmigratelist").hide(500);
4870
  }
4871
  });
4872
- jQuery('#<?php echo self::$opt_nocookie; ?>').change(function ()
4873
  {
4874
  if (jQuery(this).is(":checked"))
4875
  {
@@ -4881,7 +4881,7 @@ class YouTubePrefs
4881
  }
4882
 
4883
  });
4884
- jQuery('#<?php echo self::$opt_gdpr_consent; ?>').change(function ()
4885
  {
4886
  if (jQuery(this).is(":checked"))
4887
  {
@@ -4896,7 +4896,7 @@ class YouTubePrefs
4896
  jQuery('.vi-not-interested').on('click', function (e)
4897
  {
4898
  //e.preventDefault();
4899
- jQuery('a.nav-tab[href="#jumpdefaults"]').click();
4900
  setTimeout(function ()
4901
  {
4902
  var scrollNext = jQuery('#vi_hide_monetize_tab').offset().top - 20;
@@ -4908,7 +4908,7 @@ class YouTubePrefs
4908
  }, 500);
4909
  });
4910
 
4911
- jQuery('#<?php echo self::$opt_defaultvol; ?>').change(function ()
4912
  {
4913
  if (jQuery(this).is(":checked"))
4914
  {
@@ -5784,8 +5784,8 @@ class YouTubePrefs
5784
  'ytapi_load' => self::$alloptions[self::$opt_ytapi_load],
5785
  'pause_others' => self::$alloptions[self::$opt_pause_others] == '1' ? true : false,
5786
  'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false,
5787
- 'vi_active' => self::$alloptions[self::$opt_vi_active] == '1' ? true : false,
5788
- 'vi_js_posttypes' => self::$alloptions[self::$opt_vi_js_posttypes]
5789
  );
5790
 
5791
  wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars);
@@ -5854,9 +5854,9 @@ class YouTubePrefs
5854
  wp_enqueue_style('__ytprefs_admin__vi_css', plugins_url('styles/ytvi-admin' . self::$min . '.css', __FILE__), array(), self::$version);
5855
  wp_enqueue_script('__ytprefs_admin__alertify_js', plugins_url('scripts/alertify/alertify' . self::$min . '.js', __FILE__), array(), self::$version);
5856
  wp_enqueue_script('__ytprefs_admin__alertify_defaults_js', plugins_url('scripts/alertify/alertify-defaults' . self::$min . '.js', __FILE__), array(), self::$version);
5857
- wp_enqueue_script('__ytprefs_admin__moment_js', plugins_url('scripts/chartjs/moment' . self::$min . '.js', __FILE__), array(), self::$version);
5858
- wp_enqueue_script('__ytprefs_admin__chart_js', plugins_url('scripts/chartjs/chart' . self::$min . '.js', __FILE__), array('__ytprefs_admin__moment_js'), self::$version);
5859
- wp_enqueue_script('__ytprefs_admin__chart_deferred_js', plugins_url('scripts/chartjs/chartjs-plugin-deferred' . self::$min . '.js', __FILE__), array('__ytprefs_admin__chart_js'), self::$version);
5860
  }
5861
 
5862
  wp_enqueue_style('embedplusyoutube', plugins_url('scripts/embedplus_mce' . self::$min . '.css', __FILE__), array(), self::$version);
3
  Plugin Name: Embed Plus for YouTube - Gallery, Channel, Playlist, Live Stream
4
  Plugin URI: https://www.embedplus.com/dashboard/pro-easy-video-analytics.aspx?ref=plugin
5
  Description: YouTube Embed and YouTube Gallery WordPress Plugin. Embed a responsive video, YouTube channel, playlist gallery, or live stream
6
+ Version: 13.4.2
7
  Author: Embed Plus for YouTube Team
8
  Author URI: https://www.embedplus.com
9
  */
34
 
35
  public static $folder_name = 'youtube-embed-plus';
36
  public static $curltimeout = 30;
37
+ public static $version = '13.4.2';
38
  public static $opt_version = 'version';
39
  public static $optembedwidth = null;
40
  public static $optembedheight = null;
411
  {
412
 
413
 
414
+ $j('.acctitle').on('click', function ()
415
  {
416
  var $acctitle = $j(this);
417
  var $accbox = $j(this).parent().children('.accbox');
1057
  <div class="clearboth" style="height: 10px;">
1058
  </div>
1059
  <p>
1060
+ <?php _e('If you see a black/empty YouTube player, then it likely means that you do not have any currently running or future live streams that are scheduled in your channel, so the plugin isn\'t getting any data from the YouTube API to show. If you want to continue to use the channel based live stream embedding method, we suggest regularly scheduling one or more live streams so the player is not black/empty.', 'text_domain'); ?>
1061
  </p>
1062
  <div class="ep-wizard-preview-video-wrapper">
1063
  <iframe src="https://www.youtube.com/embed/live_stream?channel=<?php echo esc_attr($thechannelid) ?>" allowfullscreen="" frameborder="0"></iframe>
1747
  {
1748
  $(document).ready(function ()
1749
  {
1750
+ $('.epxout').on('click', function ()
1751
  {
1752
  $.ajax({
1753
  type: "post",
3109
  if (response.type === "success")
3110
  {
3111
  $j(response.container).append(response.data);
3112
+ $j(".ytprefs_glance_button").on('click', widen_ytprefs_glance);
3113
+ $j(window).on('resize', widen_ytprefs_glance);
3114
  if (typeof ep_do_pointers === 'function')
3115
  {
3116
  //ep_do_pointers($j);
3182
  $new_pointer_content = '<h3>' . __('New Update') . '</h3>'; // ooopointer
3183
 
3184
  $new_pointer_content .= '<p>'; // ooopointer
3185
+ $new_pointer_content .= "This update adds compatability for WordPress 5.7+ and the latest version of jQuery for both Free and <a target=_blank href=" . self::$epbase . '/dashboard/pro-easy-video-analytics.aspx?ref=frompointer' . ">Pro versions</a>.";
3186
  if (self::vi_logged_in())
3187
  {
3188
  $new_pointer_content .= "<br><br><strong>Note:</strong> You are currently logged into the vi intelligence feature. vi support is being deprecated in the next version, so we recommend taking the vi ads down from your site. Please contact ext@embedplus.com for questions.";
4713
  {
4714
  alertify.alert(alertmessage);
4715
  var tabSelector = '.wrap-ytprefs .nav-tab-wrapper .nav-tab[href=#' + $tabFocus.attr('id') + ']';
4716
+ $(tabSelector).trigger('click');
4717
  }
4718
  if (!$formDefaults.find('#ajax_save').is(':checked'))
4719
  {
4780
  {
4781
  window.scrollTo(0, 0);
4782
  }, 1);
4783
+ $('.wrap-ytprefs .nav-tab-wrapper a[href="' + window.location.hash + '"]').trigger('click');
4784
  }
4785
 
4786
  $('#ytform').on('submit', function (e)
4788
  return window.savevalidate(e);
4789
  });
4790
 
4791
+ jQuery('#<?php echo self::$opt_defaultdims; ?>').on('change', function ()
4792
  {
4793
  if (jQuery(this).is(":checked"))
4794
  {
4800
  }
4801
 
4802
  });
4803
+ jQuery('#<?php echo self::$opt_gallery_customarrows; ?>').on('change', function ()
4804
  {
4805
  if (jQuery(this).is(":checked"))
4806
  {
4812
  }
4813
 
4814
  });
4815
+ jQuery('#<?php echo self::$opt_gallery_collapse_grid; ?>').on('change', function ()
4816
  {
4817
  if (jQuery(this).is(":checked"))
4818
  {
4823
  jQuery("#box_collapse_grid").hide(500);
4824
  }
4825
  });
4826
+ jQuery('#<?php echo self::$opt_restrict_wizard; ?>').on('change', function ()
4827
  {
4828
  if (jQuery(this).is(":checked"))
4829
  {
4835
  }
4836
  });
4837
 
4838
+ jQuery('#<?php echo self::$opt_gallery_channelsub; ?>').on('change', function ()
4839
  {
4840
  if (jQuery(this).is(":checked"))
4841
  {
4847
  }
4848
 
4849
  });
4850
+ jQuery('#<?php echo self::$opt_responsive; ?>').on('change', function ()
4851
  {
4852
  if (jQuery(this).is(":checked"))
4853
  {
4858
  jQuery("#boxresponsive_all").hide(500);
4859
  }
4860
  });
4861
+ jQuery('#<?php echo self::$opt_migrate; ?>').on('change', function ()
4862
  {
4863
  if (jQuery(this).is(":checked"))
4864
  {
4869
  jQuery("#boxmigratelist").hide(500);
4870
  }
4871
  });
4872
+ jQuery('#<?php echo self::$opt_nocookie; ?>').on('change', function ()
4873
  {
4874
  if (jQuery(this).is(":checked"))
4875
  {
4881
  }
4882
 
4883
  });
4884
+ jQuery('#<?php echo self::$opt_gdpr_consent; ?>').on('change', function ()
4885
  {
4886
  if (jQuery(this).is(":checked"))
4887
  {
4896
  jQuery('.vi-not-interested').on('click', function (e)
4897
  {
4898
  //e.preventDefault();
4899
+ jQuery('a.nav-tab[href="#jumpdefaults"]').trigger('click');
4900
  setTimeout(function ()
4901
  {
4902
  var scrollNext = jQuery('#vi_hide_monetize_tab').offset().top - 20;
4908
  }, 500);
4909
  });
4910
 
4911
+ jQuery('#<?php echo self::$opt_defaultvol; ?>').on('change', function ()
4912
  {
4913
  if (jQuery(this).is(":checked"))
4914
  {
5784
  'ytapi_load' => self::$alloptions[self::$opt_ytapi_load],
5785
  'pause_others' => self::$alloptions[self::$opt_pause_others] == '1' ? true : false,
5786
  'stopMobileBuffer' => self::$alloptions[self::$opt_stop_mobile_buffer] == '1' ? true : false,
5787
+ 'vi_active' => false, // self::$alloptions[self::$opt_vi_active] == '1' ? true : false,
5788
+ 'vi_js_posttypes' => array() // self::$alloptions[self::$opt_vi_js_posttypes]
5789
  );
5790
 
5791
  wp_localize_script('__ytprefs__', '_EPYT_', $my_script_vars);
5854
  wp_enqueue_style('__ytprefs_admin__vi_css', plugins_url('styles/ytvi-admin' . self::$min . '.css', __FILE__), array(), self::$version);
5855
  wp_enqueue_script('__ytprefs_admin__alertify_js', plugins_url('scripts/alertify/alertify' . self::$min . '.js', __FILE__), array(), self::$version);
5856
  wp_enqueue_script('__ytprefs_admin__alertify_defaults_js', plugins_url('scripts/alertify/alertify-defaults' . self::$min . '.js', __FILE__), array(), self::$version);
5857
+ //wp_enqueue_script('__ytprefs_admin__moment_js', plugins_url('scripts/chartjs/moment' . self::$min . '.js', __FILE__), array(), self::$version);
5858
+ //wp_enqueue_script('__ytprefs_admin__chart_js', plugins_url('scripts/chartjs/chart' . self::$min . '.js', __FILE__), array('__ytprefs_admin__moment_js'), self::$version);
5859
+ //wp_enqueue_script('__ytprefs_admin__chart_deferred_js', plugins_url('scripts/chartjs/chartjs-plugin-deferred' . self::$min . '.js', __FILE__), array('__ytprefs_admin__chart_js'), self::$version);
5860
  }
5861
 
5862
  wp_enqueue_style('embedplusyoutube', plugins_url('scripts/embedplus_mce' . self::$min . '.css', __FILE__), array(), self::$version);