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
| import React from 'react' | |
| function defaultGetWidth () { | |
| return window.innerWidth; | |
| } | |
| function defaultGetHeight () { | |
| return window.innerHeight; | |
| } |
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
| var __extends = (this && this.__extends) || function (d, b) { | |
| for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | |
| function __() { this.constructor = d; } | |
| __.prototype = b.prototype; | |
| d.prototype = new __(); | |
| }; | |
| define(["require", "exports"], function (require, exports) { | |
| var GaussianBlur = (function (_super) { | |
| __extends(GaussianBlur, _super); | |
| function GaussianBlur() { |
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 getFamilyTree(el) { | |
| const levels = new Map(); | |
| function bfs(el, level) { | |
| const levelElements = levels.get(level) || []; | |
| for (const child of el.children) { | |
| child.style.opacity = '0'; | |
| levelElements.push(child); |
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(modules) { // webpackBootstrap | |
| /******/ // The module cache | |
| /******/ var installedModules = {}; | |
| /******/ // The require function | |
| /******/ function __webpack_require__(moduleId) { | |
| /******/ // Check if module is in cache | |
| /******/ if(installedModules[moduleId]) | |
| /******/ return installedModules[moduleId].exports; |
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
| /* one item */ | |
| li:first-child:nth-last-child(1) { | |
| width: 100%; | |
| } | |
| /* two items */ | |
| li:first-child:nth-last-child(2), | |
| li:first-child:nth-last-child(2) ~ li { | |
| width: 50%; | |
| } |
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
| let searchRoot = ReactDom.render(React.createElement(Main), document.getElementById('main')); | |
| try { | |
| var getComponent = (comp) => comp._renderedComponent ? getComponent(comp._renderedComponent) : comp; | |
| var getComponentById = (id)=> { | |
| var comp = searchRoot._reactInternalInstance; | |
| var path = id.substr(1).split('.').map(a=> '.' + a); | |
| if (comp._rootNodeID !== path.shift()) throw 'Unknown root'; | |
| while (path.length > 0) { | |
| comp = getComponent(comp)._renderedChildren[path.shift()]; |
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
| // 1) fetch members of polish parlament (poslowie) | |
| // 2) group them by occupation | |
| // 3) sort occupations by number of members and occupation name | |
| // 4) get top 5 entries | |
| // 5) print result on the screen | |
| (function() { | |
| 'use strict'; | |
| const POSLOWIE_ENDPOINT = 'https://api-v3.mojepanstwo.pl/dane/poslowie/'; |
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
| <head> | |
| ... | |
| <meta name="viewport" content="width=device-width"> | |
| ... | |
| </head> |
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
| // prevent webkit autofill style | |
| &:-webkit-autofill, | |
| &:-webkit-autofill:focus { | |
| -webkit-box-shadow: 0 0 0 100px #fff inset; | |
| -webkit-text-fill-color: #333; | |
| } |
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
| Math.radians = function(degrees) { | |
| return degrees * Math.PI / 180; | |
| }; | |
| Math.degrees = function(radians) { | |
| return radians * 180 / Math.PI; | |
| }; | |
| Math.ctg = function(val) { | |
| return 1/Math.tan(val); | |
| } |