puvox-library 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library_standard.js +25 -2
- package/package.json +1 -1
package/library_standard.js
CHANGED
@@ -665,6 +665,29 @@ const puvox_library =
|
|
665
665
|
);
|
666
666
|
},
|
667
667
|
|
668
|
+
MakeIframeFullHeight(iframeElement, cycling, overwrite_margin){
|
669
|
+
cycling= cycling || false;
|
670
|
+
overwrite_margin= overwrite_margin || false;
|
671
|
+
iframeElement.style.width = "100%";
|
672
|
+
var ifrD = iframeElement.contentDocument || iframeElement.contentWindow.document;
|
673
|
+
var mHeight = parseInt( window.getComputedStyle( ifrD.documentElement).height ); // Math.max( ifrD.body.scrollHeight, .. offsetHeight, ....clientHeight,
|
674
|
+
var margins = ifrD.body.style.margin + ifrD.body.style.padding + ifrD.documentElement.style.margin + ifrD.documentElement.style.padding;
|
675
|
+
if(margins=="") { margins=0; if(overwrite_margin) { ifrD.body.style.margin="0px"; } }
|
676
|
+
(function(){
|
677
|
+
var interval = setInterval(function(){
|
678
|
+
if(ifrD.readyState == 'complete' ){
|
679
|
+
setTimeout( function(){
|
680
|
+
if(!cycling) { setTimeout( function(){ clearInterval(interval);}, 500); }
|
681
|
+
iframeElement.style.height = (parseInt(window.getComputedStyle( ifrD.documentElement).height) + parseInt(margins)+1) +"px";
|
682
|
+
}, 200 );
|
683
|
+
}
|
684
|
+
},200)
|
685
|
+
})();
|
686
|
+
//var funcname= arguments.callee.name;
|
687
|
+
//window.setTimeout( function(){ console.log(funcname); console.log(cycling); window[funcname](iframeElement, cycling); }, 500 );
|
688
|
+
},
|
689
|
+
|
690
|
+
getYtIdFromURL(URLL){let r=URLL.match(/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/); return r[1];},
|
668
691
|
|
669
692
|
//state url change
|
670
693
|
//function processAjaxData(response, urlPath){
|
@@ -2406,7 +2429,7 @@ const puvox_library =
|
|
2406
2429
|
};
|
2407
2430
|
},
|
2408
2431
|
|
2409
|
-
compare(a,
|
2432
|
+
compare(a, operator, b) {
|
2410
2433
|
if(operator === '==') return a == b;
|
2411
2434
|
else if (operator === '===') return a === b;
|
2412
2435
|
else if (operator === '!=') return a != b;
|
@@ -2417,7 +2440,7 @@ const puvox_library =
|
|
2417
2440
|
else if (operator === '<=') return a <= b;
|
2418
2441
|
else throw "Unknown operator";
|
2419
2442
|
},
|
2420
|
-
calculate(a,
|
2443
|
+
calculate(a, operator, b) {
|
2421
2444
|
if(operator === '+') return a + b;
|
2422
2445
|
else if (operator === '-') return a - b;
|
2423
2446
|
else if (operator === '*') return a * b;
|