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
.flexbox { | |
display: flex; | |
justify-content: space-between; | |
& > :only-child { | |
margin-left: auto; | |
margin-right: auto; | |
} | |
} |
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
export const countNumOfLines = (el) => (el ? Math.ceil(el.clientHeight / parseInt(getComputedStyle(el, null).getPropertyValue('line-height'))) : 0) |
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
(function(XHR) { | |
"use strict"; | |
var stats = []; | |
var timeoutId = null; | |
var open = XHR.prototype.open; | |
var send = XHR.prototype.send; | |
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
/** | |
* We use this workaround to detect the Chromecast device generation. | |
* Unfortunately the Cast Application Framework (CAF) does not have an API for that. | |
* | |
* cc-1: Chromecast 1st Gen. | |
* cc-2: Chromecast 2nd Gen. | |
* cc-3: Chromecast 3rd Gen. | |
* cc-ultra: Chromecast Ultra | |
* cc-builtin: Android TV with Chromecast built-in | |
* cc-googletv: Google TV with Chromecast |
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
function gcd(a, b) { | |
return (b === 0) ? a : gcd(b, a % b); | |
} | |
function getAspectRatio(width, height) { | |
const r = gcd(width, height); | |
return `${width / r} : ${height / r}` | |
/* | |
return { | |
x: width / r, |
OlderNewer