View WebApp Analytics
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
import { initializeApp } from 'firebase/app'; | |
import { getAnalytics, logEvent } from 'firebase/analytics'; | |
import { firebaseConfig } from '../store/environment'; | |
/** | |
* It's important to double-check event names | |
* cause it's crucial to have same namimg across platforms | |
*/ | |
const CUSTOM_TYPING = new Set([ | |
'session_started', |
View Funcs -> Stack Machine
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
// Functions: | |
function a(x, y, z) { | |
x[y] = z; | |
} | |
function b(x, p) { | |
for (let i in p) a(x, i, p[i]); | |
} | |
function c() { | |
let x = { foo: 'bar' }; |
View WebDevicePerformance
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
// https://browser.primatelabs.com/ios-benchmarks | |
// https://mydevice.io/devices/ | |
// http://vizdevices.yesviz.com/devices.php | |
const IPHONE5_SIZE = 568 | |
const IPAD_SIZE = 1024 | |
const MIN_OPS = 165 /* Upper limit cpu for iPad4 */ | |
const CACHE_KEY = 'anim' | |
View console.save()
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(console){ | |
console.save = function(data, filename){ | |
if(!data) { | |
console.error('Console.save: No data') | |
return; | |
} | |
if(!filename) filename = 'console.json' |
View Measure CSS recalculations
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 fillStyles(el, sel, styles, type){ | |
el[sel] = el[sel] || {} | |
for (var key in styles) { | |
if (!isNaN(key)) { | |
if (el[sel][styles[key]]) { | |
let selector | |
if (type === 'id') selector = '#'+sel | |
else if (type === 'class') selector = '.'+sel | |
else selector = '<'+sel+'>' | |
return { |