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() { | |
| const visualize = (target) => { | |
| const {x, y, height, width} = target.getBoundingClientRect(); | |
| const div = document.createElement('div'); | |
| [div.style.position, div.style.opacity, div.style.zIndex] = ['fixed', 0.5, 999]; | |
| [div.style.backgroundColor, div.style.border] = ['green', '1px solid black']; | |
| [div.style.height, div.style.width] = [`${height}px`, `${width}px`]; | |
| [div.style.left, div.style.top] = [`${x}px`, `${y}px`]; | |
| div.style.transition = 'opacity 0.5s'; | |
| div.className = 'visualizer'; |
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
| <script src="https://code.jquery.com/jquery-2.2.4.min.js"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | |
| <style> | |
| a.item-navbar{ | |
| border: 1px solid #e3e3e3; | |
| padding: 10px 5px; | |
| color: #333; | |
| margin: 20px 0 !important; | |
| display: table; |
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 function OneSearchBadgePhoto() { | |
| const div: HTMLElement = Reflect.construct(HTMLElement, [], OneSearchBadgePhoto); | |
| div.innerText = 'omg'; | |
| return div; | |
| } | |
| OneSearchBadgePhoto.prototype = Object.create(HTMLElement.prototype); | |
| customElements.define('one-search-badgephoto', OneSearchBadgePhoto); | |
| /** |
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 (global) { | |
| const FUNCTION = 'FUNCTION'; | |
| const entries = (obj, cycles, f = FUNCTION) => { | |
| const tree = {}; | |
| const checkCycle = (obj, key) => cycles.find(([o, k]) => obj === o && key === k); | |
| Object.entries(obj).forEach(([key, value]) => { | |
| if (checkCycle(obj, key)) { | |
| return; |
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
| /** | |
| * @fileoverview Closure Compiler externs for Facebook React.js 0.13.2. | |
| * @see http://reactjs.org | |
| * @externs | |
| */ | |
| /** | |
| * @const | |
| */ | |
| var React = {}; |
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 (global) { | |
| const applyUserGesture = () => new Promise((resolve) => { | |
| alert('Click on web page to continue'); | |
| const handler = () => { | |
| document.body.removeEventListener('click', handler); | |
| resolve(); | |
| } | |
| document.body.addEventListener('click', handler, false); | |
| }); |
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 (global) { | |
| const console = global.console; | |
| global.console = Object.assign(console, Object.fromEntries(Object.entries(console) | |
| .filter(([key]) => ['log', 'warn'].includes(key)) | |
| .map(([key, value]) => [key, (...args) => requestIdleCallback(() => value(...args))]))); | |
| })(window); |
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 (global) { | |
| const save = (blob, name = 'image.png') => { | |
| const a = document.createElement("a"); | |
| a.href = URL.createObjectURL(blob); | |
| a.download = name; | |
| a.click(); | |
| }; | |
| const capture = (video, format, quality) => { |
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() { | |
| window.RTCPeerConnectionBackup = window.RTCPeerConnectionBackup || window.RTCPeerConnection; | |
| window.RTCPeerConnectionArray = window.RTCPeerConnectionArray || []; | |
| window.RTCPeerConnection = class extends RTCPeerConnectionBackup { | |
| constructor(...args) { | |
| super(...args); | |
| window.RTCPeerConnectionArray.push(this) | |
| } | |
| } | |
| )(); |
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
| <div style="display: flex;"> | |
| <div style="background: yellow;"> | |
| <img> | |
| </div> | |
| </div> | |
| <script> | |
| (function() { | |
| const transparentImage = ( |