Plugin Directory

Changeset 3230036


Ignore:
Timestamp:
01/27/2025 11:27:21 PM (14 months ago)
Author:
snexed
Message:

v2.3.1

Location:
ploxel
Files:
12 added
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • ploxel/trunk/js/ploxel_jquery.js

    r3230025 r3230036  
    66 */
    77
    8 function(d){var c,l,f,a,v,z,I,x,r,u,M,i,m,k;function g(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function F(e,n,i){e.addEventListener(n,i,!1)}function B(e,n,i){e.removeEventListener(n,i,!1)}function w(e){return z+"["+(n="Host page: "+(e=e),n=window.top!==window.self?window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e:n)+"]";var n}function t(e){return M[e]?M[e].log:f}function R(e,n){o("log",e,n,t(e))}function O(e,n){o("info",e,n,t(e))}function E(e,n){o("warn",e,n,!0)}function o(e,n,i,t){!0===t&&"object"==typeof window.console&&console[e](w(n),i)}function n(e){function i(){t("Height"),t("Width"),P(function(){H(w),C(b),u("onResized",w)},w,"init")}function n(){var e=p.slice(I).split(":"),n=e[1]?parseInt(e[1],10):0,i=M[e[0]]&&M[e[0]].iframe,t=getComputedStyle(i);return{iframe:i,id:e[0],height:n+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.paddingTop?parseInt(e.paddingTop,10):0,e=e.paddingBottom?parseInt(e.paddingBottom,10):0;return n+e}(t)+function(e){if("border-box"!==e.boxSizing)return 0;var n=e.borderTopWidth?parseInt(e.borderTopWidth,10):0,e=e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0;return n+e}(t),width:e[2],type:e[3]}}function t(e){var n=Number(M[b]["max"+e]),i=Number(M[b]["min"+e]),e=e.toLowerCase(),t=Number(w[e]);R(b,"Checking "+e+" is in range "+i+"-"+n),t<i&&(t=i,R(b,"Set "+e+" to min value")),n<t&&(t=n,R(b,"Set "+e+" to max value")),w[e]=""+t}function o(){var t=e.origin,o=M[b]&&M[b].checkOrigin;if(o&&""+t!="null"&&!function(){if(o.constructor!==Array)return e=M[b]&&M[b].remoteHost,R(b,"Checking connection is from: "+e),t===e;var e,n=0,i=!1;for(R(b,"Checking connection is from allowed list of origins: "+o);n<o.length;n++)if(o[n]===t){i=!0;break}return i}())throw new Error("Unexpected message received from: "+t+" for "+w.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return 1}function a(e){return p.slice(p.indexOf(":")+v+e)}function s(i,t){var e,n,o;e=function(){var e,n;A("Send Page Info","pageInfo:"+(e=document.body.getBoundingClientRect(),n=w.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-e.top,10),offsetLeft:parseInt(n.left-e.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),i,t)},n=32,k[o=t]||(k[o]=setTimeout(function(){k[o]=null,e()},n))}function r(e){e=e.getBoundingClientRect();return W(b),{x:Math.floor(Number(e.left)+Number(x.x)),y:Math.floor(Number(e.top)+Number(x.y))}}function d(e){var n=e?r(w.iframe):{x:0,y:0},i={x:Number(w.width)+n.x,y:Number(w.height)+n.y};R(b,"Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top===window.self?(x=i,c(),R(b,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](i.x,i.y):E(b,"Unable to scroll to requested position, window.parentIFrame not found")}function c(){!1===u("onScroll",x)?S():C(b)}function l(e){var e=e.split("#")[1]||"",n=decodeURIComponent(e),n=document.getElementById(n)||document.getElementsByName(n)[0];n?(n=r(n),R(b,"Moving to in page link (#"+e+") at x: "+n.x+" y: "+n.y),x={x:n.x,y:n.y},c(),R(b,"--")):window.top===window.self?R(b,"In page link #"+e+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(e):R(b,"In page link #"+e+" not found and window.parentIFrame not found")}function f(e){var n,i={};i=0===Number(w.width)&&0===Number(w.height)?{x:(n=a(9).split(":"))[1],y:n[0]}:{x:w.width,y:w.height},u(e,{iframe:w.iframe,screenX:Number(i.x),screenY:Number(i.y),type:w.type})}function u(e,n){return T(b,e,n)}function m(){switch(M[b]&&M[b].firstRun&&M[b]&&(M[b].firstRun=!1),w.type){case"close":N(w.iframe);break;case"message":n=a(6),R(b,"onMessage passed: {iframe: "+w.iframe.id+", message: "+n+"}"),u("onMessage",{iframe:w.iframe,message:JSON.parse(n)}),R(b,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":M[b].autoResize=JSON.parse(a(9));break;case"scrollTo":d(!1);break;case"scrollToOffset":d(!0);break;case"pageInfo":s(M[b]&&M[b].iframe,b),r=b,e("Add ",F),M[r]&&(M[r].stopPageInfo=o);break;case"pageInfoStop":M[b]&&M[b].stopPageInfo&&(M[b].stopPageInfo(),delete M[b].stopPageInfo);break;case"inPageLink":l(a(9));break;case"reset":j(w);break;case"init":i(),u("onInit",w.iframe);break;default:0===Number(w.width)&&0===Number(w.height)?E("Unsupported message received ("+w.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):i()}function e(n,i){function t(){M[r]?s(M[r].iframe,r):o()}["scroll","resize"].forEach(function(e){R(r,n+e+" listener for sendPageInfo"),i(window,e,t)})}function o(){e("Remove ",B)}var r,n}var g,h,p=e.data,w={},b=null;if("[iFrameResizerChild]Ready"===p)for(var y in M)A("iFrame requested init",L(y),M[y].iframe,y);else z===(""+p).slice(0,I)&&p.slice(I).split(":")[0]in M?(w=n(),b=w.id,M[b]&&(M[b].loaded=!0),(h=w.type in{true:1,false:1,undefined:1})&&R(b,"Ignoring init message from meta parent page"),!h&&(h=!0,M[g=b]||(h=!1,E(w.type+" No settings for "+g+". Message was: "+p)),h)&&(R(b,"Received: "+p),g=!0,null===w.iframe&&(E(b,"IFrame ("+w.id+") not found"),g=!1),g&&o()&&m())):O(b,"Ignored: "+p)}function T(e,n,i){var t=null,o=null;if(M[e]){if("function"!=typeof(t=M[e][n]))throw new TypeError(n+" on iFrame["+e+"] is not a function");o=t(i)}return o}function h(e){e=e.id;delete M[e]}function N(e){var n=e.id;if(!1===T(n,"onClose",n))R(n,"Close iframe cancelled by onClose event");else{R(n,"Removing iFrame: "+n);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){E(e)}T(n,"onClosed",n),R(n,"--"),h(e),l&&(l.disconnect(),l=null)}}function W(e){null===x&&R(e,"Get page position: "+(x={x:window.pageXOffset===d?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===d?document.documentElement.scrollTop:window.pageYOffset}).x+","+x.y)}function C(e){null!==x&&(window.scrollTo(x.x,x.y),R(e,"Set page position: "+x.x+","+x.y),S())}function S(){x=null}function j(e){R(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),W(e.id),P(function(){H(e),A("reset","reset",e.iframe,e.id)},e,"reset")}function H(o){function i(e){var n;function i(){Object.keys(M).forEach(function(e){function n(e){return"0px"===(M[i]&&M[i].iframe.style[e])}var i;M[i=e]&&null!==M[i].iframe.offsetParent&&(n("height")||n("width"))&&A("Visibility change","resize",M[i].iframe,i)})}function t(e){R("window","Mutation observed: "+e[0].target+" "+e[0].type),p(i,16)}!a&&"0"===o[e]&&(a=!0,R(r,"Hidden iFrame detected, creating visibility listener"),e=g())&&(n=document.querySelector("body"),new e(t).observe(n,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}function e(e){var n;n=e,o.id?(o.iframe.style[n]=o[n]+"px",R(o.id,"IFrame ("+r+") "+n+" set to "+o[n]+"px")):R("undefined","messageData id not set"),i(e)}var r=o.iframe.id;M[r]&&(M[r].sizeHeight&&e("height"),M[r].sizeWidth)&&e("width")}function P(e,n,i){i!==n.type&&r&&!window.jasmine?(R(n.id,"Requesting animation frame"),r(e)):e()}function A(n,i,t,o,e){function r(){var e;t&&"contentWindow"in t&&null!==t.contentWindow?(e=M[o]&&M[o].targetOrigin,R(o,"["+n+"] Sending msg to iframe["+o+"] ("+i+") targetOrigin: "+e),t.contentWindow.postMessage(z+i,e)):E(o,"["+n+"] IFrame("+o+") not found")}function a(){e&&M[o]&&M[o].warningTimeout&&(M[o].msgTimeout=setTimeout(function(){!M[o]||M[o].loaded||s||(s=!0,E(o,"IFrame has not responded within "+M[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))},M[o].warningTimeout))}var s=!1;o=o||t.id,M[o]&&(r(),a())}function L(e){return e+":"+M[e].bodyMarginV1+":"+M[e].sizeWidth+":"+M[e].log+":"+M[e].interval+":"+M[e].enablePublicMethods+":"+M[e].autoResize+":"+M[e].bodyMargin+":"+M[e].heightCalculationMethod+":"+M[e].bodyBackground+":"+M[e].bodyPadding+":"+M[e].tolerance+":"+M[e].inPageLinks+":"+M[e].resizeFrom+":"+M[e].widthCalculationMethod+":"+M[e].mouseEvents}function s(t,i){function e(i){var e=g();e&&(e=e,l=t.parentNode?((e=new e(function(e){e.forEach(function(e){Array.prototype.slice.call(e.removedNodes).forEach(function(e){e===t&&N(t)})})})).observe(t.parentNode,{childList:!0}),e):null),F(t,"load",function(){var e,n;A("iFrame.onload",i,t,d,!0),e=M[r]&&M[r].firstRun,n=M[r]&&M[r].heightCalculationMethod in u,!e&&n&&j({iframe:t,height:0,width:0,type:"init"})}),A("init",i,t,d,!0)}function o(e){var n=e.split("Callback");2===n.length&&(this[n="on"+n[0].charAt(0).toUpperCase()+n[0].slice(1)]=this[e],delete this[e],E(r,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version."))}function n(e){if(e=e||{},M[r]=Object.create(null),M[r].iframe=t,M[r].firstRun=!0,M[r].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),"object"!=typeof e)throw new TypeError("Options is not an object");Object.keys(e).forEach(o,e);var n,i=e;for(n in m)Object.prototype.hasOwnProperty.call(m,n)&&(M[r][n]=(Object.prototype.hasOwnProperty.call(i,n)?i:m)[n]);M[r]&&(M[r].targetOrigin=!0!==M[r].checkOrigin||""===(e=M[r].remoteHost)||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e)}var r=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var n;return""===e&&(t.id=(n=i&&i.id||m.id+c++,null!==document.getElementById(n)&&(n+=c++),e=n),f=(i||{}).log,R(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);if(r in M&&"iFrameResizer"in t)E(r,"Ignored iFrame, already setup.");else{switch(n(i),R(r,"IFrame scrolling "+(M[r]&&M[r].scrolling?"enabled":"disabled")+" for "+r),t.style.overflow=!1===(M[r]&&M[r].scrolling)?"hidden":"auto",M[r]&&M[r].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=M[r]?M[r].scrolling:"no"}s("Height"),s("Width"),a("maxHeight"),a("minHeight"),a("maxWidth"),a("minWidth"),"number"!=typeof(M[r]&&M[r].bodyMargin)&&"0"!==(M[r]&&M[r].bodyMargin)||(M[r].bodyMarginV1=M[r].bodyMargin,M[r].bodyMargin=M[r].bodyMargin+"px"),e(L(r)),M[r]&&(M[r].iframe.iFrameResizer={close:N.bind(null,M[r].iframe),removeListeners:h.bind(null,M[r].iframe),resize:A.bind(null,"Window resize","resize",M[r].iframe),moveToAnchor:function(e){A("Move to anchor","moveToAnchor:"+e,M[r].iframe,r)},sendMessage:function(e){A("Send Message","message:"+(e=JSON.stringify(e)),M[r].iframe,r)}})}function a(e){var n=M[r][e];1/0!==n&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,R(r,"Set "+e+" = "+t.style[e]))}function s(e){if(M[r]["min"+e]>M[r]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}}function p(e,n){null===i&&(i=setTimeout(function(){i=null,e()},n))}function b(){"hidden"!==document.visibilityState&&(R("document","Trigger event: Visibility change"),p(function(){y("Tab Visible","resize")},16))}function y(i,t){Object.keys(M).forEach(function(e){var n;M[n=e]&&"parent"===M[n].resizeFrom&&M[n].autoResize&&!M[n].firstRun&&A(i,t,M[e].iframe,e)})}function q(){F(window,"message",n),F(window,"resize",function(){var e;R("window","Trigger event: "+(e="resize")),p(function(){y("Window "+e,"resize")},16)}),F(document,"visibilitychange",b),F(document,"-webkit-visibilitychange",b)}function e(){function t(e,n){if(n){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">");s(n,e),o.push(n)}}for(var o,e=["moz","webkit","o","ms"],n=0;n<e.length&&!r;n+=1)r=window[e[n]+"RequestAnimationFrame"];return r?r=r.bind(window):R("setup","RequestAnimationFrame not supported"),q(),function(e,n){var i;switch(o=[],(i=e)&&i.enablePublicMethods&&E("enablePublicMethods option has been removed, public methods are now always available in the iFrame"),typeof n){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(n||"iframe"),t.bind(d,e));break;case"object":t(e,n);break;default:throw new TypeError("Unexpected data type ("+typeof n+")")}return o}}function V(e){e.fn?e.fn.iFrameResize||(e.fn.iFrameResize=function(i){return this.filter("iframe").each(function(e,n){s(n,i)}).end()}):O("","Unable to bind to jQuery, it is not fully loaded.")}"undefined"!=typeof window&&(c=0,a=f=!1,v="message".length,I=(z="[iFrameSizer]").length,x=null,r=window.requestAnimationFrame,u=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),M={},i=null,m=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){E("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),k={},window.jQuery!==d&&V(window.jQuery),"function"==typeof define&&define.amd?define([],e):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=e()),window.iFrameResize=window.iFrameResize||e())}();
    9 
    10 iFrameResize({}, '.iFrameResize' );
     8!function(){"use strict";const e="5.3.2",t=10,n="data-iframe-size",o="data-overflowed",i="bottom",r="right",a="resizeParent",l=(e,t,n,o)=>e.addEventListener(t,n,o||!1),s=(e,t,n)=>e.removeEventListener(t,n,!1),c=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const d=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(c[e]),u=e=>e,m=1e5,f=e=>Math.round(e*m)/m;let p="",h=!1;const y=e=>{p=e.id,h=e.logging},g=e=>""!=`${e}`&&void 0!==e;const b=(...e)=>[`[iframe-resizer][${p||"child"}]`,...e].join(" "),v=(...e)=>h&&console?.info(`%c[iframe-resizer][${p}]%c`,"font-weight: bold;","font-weight: normal;",...e),w=(...e)=>console?.warn(b(...e)),z=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e(t.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(b)(...e)),S=e=>z(e),E=e=>{const t=e.side||i,n=e.onChange||u,r={root:e.root,rootMargin:"0px",threshold:1};function a(){const e=document.querySelectorAll(`[${o}]`);n(e)}const l=new IntersectionObserver((function(e){for(const n of e){const{boundingClientRect:e,rootBounds:i,target:r}=n,a=e[t],l=0===a||a>i[t];r.toggleAttribute(o,l)}requestAnimationFrame(a)}),r),s=new WeakSet;return function(e){for(const t of e)t.nodeType!==Node.ELEMENT_NODE||s.has(t)||(l.observe(t),s.add(t))}},j="--ifr-start",$="--ifr-end",C="--ifr-measure",T=[],M=new WeakSet,O=e=>"object"==typeof e&&M.add(e);let P=null,A={};const N=setInterval((()=>{if(T.length<10)return;if(A.hasTags&&A.len<25)return;T.sort();const e=Math.min(T.reduce(((e,t)=>e+t),0)/T.length,T[Math.floor(T.length/2)]);e<=4||(clearInterval(N),z(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${f(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${A.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function I(e){e.getEntries().forEach((e=>{if(e.name===$){const{duration:t}=performance.measure(C,j,$);!function(e,t){const{Side:n,len:o,hasTags:i,logging:r}=e;A=e,M.has(P)||i&&o<=1||(r||O(P),v(`\n  ${n} position calculated from:`,P,`\n  Parsed ${o} ${i?"tagged":"potentially overflowing"} elements in ${f(t)}ms`))}(e.detail,t),T.push(t),T.length>100&&T.shift()}}))}function k(){new PerformanceObserver(I).observe({entryTypes:["mark"]}),O(document.documentElement),O(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",k):k()),"undefined"!=typeof window&&function(){const o={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},c={height:()=>(w("Custom height calculation function not defined"),Be.auto()),width:()=>(w("Custom width calculation function not defined"),De.auto())},m={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},p=128,h={},b="checkVisibility"in window,v="auto",C="[iFrameSizer]",T=C.length,M={max:1,min:1,bodyScroll:1,documentElementScroll:1},O="scroll";let A,N,I,k,R,x=!0,q="",L=0,B="",D="",W=!0,U=!1,F=!0,V=!1,J=!1,H=1,Z=v,_=!0,Q="",X={},Y=!1,G=0,K=!1,ee="",te=u,ne=[],oe="child",ie=null,re=!1,ae="",le=[],se=window.parent,ce="*",de=0,ue=!1,me="",fe=1,pe=O,he=window,ye=()=>{w("onMessage function not defined")},ge=()=>{},be=null,ve=null;function we(){var o,s,u;!function(){const e=e=>"true"===e,t=Q.slice(T).split(":");ee=t[0],L=void 0===t[1]?L:Number(t[1]),U=void 0===t[2]?U:e(t[2]),Y=void 0===t[3]?Y:e(t[3]),x=void 0===t[6]?x:e(t[6]),B=t[7],Z=void 0===t[8]?Z:t[8],q=t[9],D=t[10],de=void 0===t[11]?de:Number(t[11]),X.enable=void 0!==t[12]&&e(t[12]),oe=void 0===t[13]?oe:t[13],pe=void 0===t[14]?pe:t[14],K=void 0===t[15]?K:e(t[15]),A=void 0===t[16]?A:Number(t[16]),N=void 0===t[17]?N:Number(t[17]),W=void 0===t[18]?W:e(t[18]),t[19],me=t[20]||me,G=void 0===t[21]?G:Number(t[21])}(),y({id:ee,logging:Y}),function(){function e(e){ye=e?.onMessage||ye,ge=e?.onReady||ge,"number"==typeof e?.offset&&(z("<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),W&&(A=e?.offset),U&&(N=e?.offset)),"number"==typeof e?.offsetSize&&(W&&(A=e?.offsetSize),U&&(N=e?.offsetSize)),Object.prototype.hasOwnProperty.call(e,"sizeSelector")&&(ae=e.sizeSelector),ce=e?.targetOrigin||ce,Z=e?.heightCalculationMethod||Z,pe=e?.widthCalculationMethod||pe}function t(e,t){return"function"==typeof e&&(c[t]=e,e="custom"),e}if(1===G)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Z=t(Z,"height"),pe=t(pe,"width"))}(),function(){try{re="iframeParentListener"in window.parent}catch(e){}}(),G<0?S(`${d(G+2)}${d(2)}`):me.codePointAt(0)>4||G<2&&S(d(3)),me&&""!==me&&"false"!==me?me!==e&&z(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${me} - Child page: ${e}.\n`):z("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),Me(),Oe(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.toggleAttribute(n,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&z("<rb>Deprecated Attributes</>\n          \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),Se(),W!==U&&(te=E({onChange:ze,root:document.documentElement,side:W?i:r})),1!==G&&(he.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===x?(x=!0,Fe("autoResizeEnabled","Auto Resize enabled")):!1===e&&!0===x&&(x=!1),Ze(0,0,"autoResize",JSON.stringify(x)),x),close(){Ze(0,0,"close")},getId:()=>ee,getOrigin:()=>I,getPageInfo(e){if("function"==typeof e)return be=e,Ze(0,0,"pageInfo"),void z("<rb>Deprecated Method</>\n          \nThe <b>getPageInfo()</> method has been deprecated and replaced with  <b>getParentProps()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n");be=null,Ze(0,0,"pageInfoStop")},getParentProps(e){if("function"!=typeof e)throw new TypeError("parentIframe.getParentProps(callback) callback not a function");return ve=e,Ze(0,0,"parentInfo"),()=>{ve=null,Ze(0,0,"parentInfoStop")}},getParentProperties(e){z("<rb>Renamed Method</>\n          \nThe <b>getParentProperties()</> method has been renamed <b>getParentProps()</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.\n"),this.getParentProps(e)},moveToAnchor(e){X.findTarget(e)},reset(){He()},scrollBy(e,t){Ze(t,e,"scrollBy")},scrollTo(e,t){Ze(t,e,"scrollTo")},scrollToOffset(e,t){Ze(t,e,"scrollToOffset")},sendMessage(e,t){Ze(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Z=e,Me()},setWidthCalculationMethod(e){pe=e,Oe()},setTargetOrigin(e){ce=e},resize(e,t){Fe(a,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){z("<rb>Deprecated Method</>\n          \nThe <b>size()</> method has been deprecated and replaced with  <b>resize()</>. Use of this method will be removed in a future version of <i>iframe-resizer</>.\n"),this.resize(e,t)}}),he.parentIFrame=he.parentIframe),function(){function e(e){Ze(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){l(window.document,t,e)}!0===K&&(t("mouseenter"),t("mouseleave"))}(),X=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function o(e){function t(e){const t=n(e);Ze(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?Ze(0,0,"inPageLink",`#${o}`):t(r)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&l(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){l(window,"hashchange",i)}function s(){setTimeout(i,p)}function c(){r(),a(),s()}return X.enable&&(1===G?z("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):c()),{findTarget:o}}(),Ee(Re(document)()),void 0===B&&(B=`${L}px`),je("margin",(s="margin",(u=B).includes("-")&&(w(`Negative CSS value ignored for ${s}`),u=""),u)),je("background",q),je("padding",D),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),$e(),Fe("init","Init message from host page",void 0,void 0,e),document.title&&""!==document.title&&Ze(0,0,"title",document.title),Ce({method:o="add",eventType:"After Print",eventName:"afterprint"}),Ce({method:o,eventType:"Before Print",eventName:"beforeprint"}),Ce({method:o,eventType:"Ready State Change",eventName:"readystatechange"}),function(){const e=new Set;let t=!1,n=0,o=[];const i=t=>{for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},r=16,a=2,l=200;let s=1;function c(){const d=performance.now(),u=d-n;if(u>r*s+++a&&u<l)return setTimeout(c,r*s),void(n=d);s=1,o.forEach(i),o=[],0!==e.size?($e(),Se(),Ee(e),e.forEach(Ne),e.clear(),t=!1):t=!1}function d(e){o.push(e),t||(n=performance.now(),t=!0,requestAnimationFrame(c))}function u(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}u()}(),ie=new ResizeObserver(Pe),ie.observe(document.body),Ae.add(document.body),Ne(document.body),setTimeout(ge)}function ze(e){ne=e,V=ne.length>0,Fe("overflowChanged","Overflow updated")}function Se(){le=document.querySelectorAll(`[${n}]`),J=le.length>0}function Ee(e){J||te(e)}function je(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function $e(){if(""!==ae)for(const e of document.querySelectorAll(ae))e.dataset.iframeSize=!0}function Ce(e){({add(t){function n(){Fe(e.eventName,e.eventType)}h[t]=n,l(window,t,n,{passive:!0})},remove(e){const t=h[e];delete h[e],s(window,e,t)}})[e.method](e.eventName)}function Te(e,t,n,o){return t!==e&&(e in n||(w(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in m&&z(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function Me(){Z=Te(Z,v,Be,"height")}function Oe(){pe=Te(pe,O,De,"width")}function Pe(e){Array.isArray(e)&&0!==e.length&&Fe("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!g(e):return"";case g(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case g(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(g(e.className)?`.${e.className}`:"")}}(e[0].target)}`)}const Ae=new WeakSet;function Ne(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!Ae.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ie.observe(e),Ae.add(e))}const t=Re(e)();for(const e of t){if(Ae.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(ie.observe(e),Ae.add(e))}}function Ie(e){performance.mark(j);const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let i=0,r=document.documentElement,a=J?0:document.documentElement.getBoundingClientRect().bottom;performance.mark(j);const l=J?le:V?ne:Re(document)();let s=l.length;for(const t of l)J||!b||t.checkVisibility(o)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,r=t)):s-=1;return P=r,performance.mark($,{detail:{Side:t,len:s,hasTags:J,logging:Y}}),a}const ke=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],Re=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)"),xe={height:0,width:0},qe={height:0,width:0};function Le(e){function t(){return qe[o]=i,xe[o]=l,i}const n=e===Be,o=n?"height":"width",i=e.boundingClientRect(),r=Math.ceil(i),a=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return l;case J:return e.taggedElement();case!V&&0===qe[o]&&0===xe[o]:return t();case ue&&i===qe[o]&&l===xe[o]:return Math.max(i,l);case 0===i:return l;case!V&&i!==qe[o]&&l<=xe[o]:return t();case!n:return e.taggedElement();case!V&&i<qe[o]:case l===a||l===r:case i>l:return t()}return Math.max(e.taggedElement(),t())}const Be={enabled:()=>W,getOffset:()=>A,auto:()=>Le(Be),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Be.bodyOffset(),custom:()=>c.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...ke(Be)),min:()=>Math.min(...ke(Be)),grow:()=>Be.max(),lowestElement:()=>Ie(i),taggedElement:()=>Ie(i)},De={enabled:()=>U,getOffset:()=>N,auto:()=>Le(De),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>c.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...ke(De)),min:()=>Math.min(...ke(De)),rightMostElement:()=>Ie(r),scroll:()=>Math.max(De.bodyScroll(),De.documentElementScroll()),taggedElement:()=>Ie(r)},We=(e,t)=>!(Math.abs(e-t)<=de);let Ue=!1;function Fe(e,t,n,o,i){R=performance.now(),(x||e===a)&&(document.hidden||(Ue||(k=!0,function(e,t,n,o,i){const r=void 0===n?Be[Z]():n,l=void 0===o?De[pe]():o;W&&We(H,r)||U&&We(fe,l)||"init"===e?(Ve(),H=r,fe=l,Ze(H,fe,e,i)):!e!==a&&(W&&Z in M||U&&pe in M)?He():k=!1}(e,0,n,o,i),requestAnimationFrame((()=>{Ue=!1}))),Ue=!0))}function Ve(){ue||(ue=!0,requestAnimationFrame((()=>{ue=!1})))}function Je(e){H=Be[Z](),fe=De[pe](),Ze(H,fe,e)}function He(e){const t=Z;Z=v,Ve(),Je("reset"),Z=t}function Ze(e,t,n,o,i){G<-1||(void 0!==i||(i=ce),function(){const r=`${ee}:${e+(A||0)}:${t+(N||0)}:${n}${void 0===o?"":`:${o}`}`;Y&&(console.group(`[iframe-resizer][${ee}]`),console.info("Sending message to host page via "+(re?"sameDomain":"postMessage")),console.info(`%c${r}`,"font-style: italic"),k&&console.info(function(){const e=f(performance.now()-R);return"init"===n?`Initialised iFrame in %c${e}ms`:`Content size recalculated in %c${e}ms`}(),"font-weight:bold;color:#777"),console.groupEnd()),k=!1,re?window.parent.iframeParentListener(C+r):se.postMessage(C+r,i)}())}function _e(e){const t={init:function(){Q=e.data,se=e.source,I=e.origin,we(),F=!1,setTimeout((()=>{_=!1}),p)},reset(){_||Je("resetPage")},resize(){Fe(a)},moveToAnchor(){X.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();be?setTimeout((()=>be(JSON.parse(e)))):Ze(0,0,"pageInfoStop")},parentInfo(){const e=o();ve?setTimeout(ve(Object.freeze(JSON.parse(e)))):Ze(0,0,"parentInfoStop")},message(){const e=o();ye(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};C===`${e.data}`.slice(0,T)&&(!1!==F?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||w(`Unexpected message (${e.data})`)}())}function Qe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}function Xe(e){return _e(e),he}"iframeChildListener"in window?w("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>_e({data:e,sameDomain:!0}))),l(window,"message",_e),l(window,"readystatechange",Qe),Qe());try{top?.document?.getElementById("banner")&&(he={},window.mockMsgListener=Xe,s(window,"message",_e),define([],(()=>Xe)))}catch(e){}}()}();
     9iframeResize({}, '.iFrameResize' );
    1110
    1211
  • ploxel/trunk/ploxel.php

    r3230025 r3230036  
    44Plugin URI: http://wordpress.org/plugins/ploxel/
    55Description: Sell tickets online your WordPress site with Ticketmeo, see https://www.ticketmeo.com/sell-tickets-on-wordpress for more information on how it works.
    6 Version: 2.3.0
     6Version: 2.3.1
    77Author: Ploxel
    88Author URI: http://www.ticketmeo.com/sell-tickets-on-wordpress
     
    1010*/
    1111
    12 define('PLOXEL_PLUGIN_VERSION', '2.2.0');
     12define('PLOXEL_PLUGIN_VERSION', '2.3.1');
    1313
    1414register_activation_hook(__FILE__, 'ploxel_activate');
     
    5858    $html .= ' id="plox' . $id . '" class="iFrameResize"></iframe>';
    5959
    60     $html .= '<script>window.addEventListener(\'DOMContentLoaded\', () => {iFrameResize(\'\',\'.iFrameResize\'); });</script>';
     60    $html .= '<script>window.addEventListener(\'DOMContentLoaded\', () => {iframeResize(\'\',\'.iFrameResize\'); });</script>';
    6161    return $html;
    6262}
  • ploxel/trunk/readme.txt

    r3230025 r3230036  
    44Requires at least: 2.8
    55Tested up to: 6.7
    6 Stable tag: 2.3.0
     6Stable tag: 2.3.1
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.