This file contains hidden or 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
// This uses Google tracking as an example | |
var interval = setInterval(function () { | |
console.log('searching..') | |
if (window._gaq) { | |
_gaq.push(['_trackPageview', 'Something']); | |
clearInterval(interval); | |
console.log('stop'); | |
} | |
}, 10); |
This file contains hidden or 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
/** | |
* Opens a new browser window | |
* @param {String} url The url of the window to open | |
* @param {String} name The name of this window | |
* @param {Number} width Window width | |
* @param {Number} height Window height */ | |
const PopUpWindow = (url, name, width, height)=> { | |
// Center the window | |
let _width = width || 450, | |
_height = height || 300, |
This file contains hidden or 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
const glob = require('glob'); | |
const jsFiles = glob.sync('src/**/*.js'); | |
const tsFiles = glob.sync('src/**/*.ts'); | |
const tsxFiles = glob.sync('src/**/*.tsx'); | |
const allTsFiles = tsFiles.concat(tsxFiles); | |
console.log(`There are ${jsFiles.length} .js files in the 'src' directory.`); | |
console.log(`There are ${allTsFiles.length} .ts/x files in the 'src' directory.`); | |
console.log(`${Math.round((allTsFiles.length / jsFiles.length) * 100)}% of the files are TypeScript files.`); |
OlderNewer