This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var iframe = document.createElement('iframe'); | |
iframe.src = 'about:blank'; | |
document.body.appendChild(iframe); | |
var windowVars = Object.keys(iframe.contentWindow); | |
var globalVars = Object.keys(window).filter(key => !windowVars.includes(key)); | |
console.log('global Vars:', globalVars); | |
document.body.removeChild(iframe); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Add extra zeros in front of a number | |
* @param str {String} | |
* @param max {Number} | |
* @returns {*} | |
*/ | |
var pad = function(str, max) { | |
return str.toString().length < max ? pm.utils.pad('0' + str, max) : str; | |
}; |