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
| /* ==UserStyle== | |
| @name Enhanced APEX Mobile | |
| @namespace apex.prosperousuniverse.com | |
| @version 0.1.0 | |
| @license wtfpl | |
| @preprocessor default | |
| ==/UserStyle== */ | |
| /* App header */ | |
| .Header__header___EHTNVNS { |
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
| type Async<T> = T | PromiseLike<T> | Promise<T>; | |
| // concrete case of more generic use :: (Monad m) => (m (m Top)) -> m (a -> b) -> m b | |
| async function useAsync<T>(lock: () => Async<() => Async<unknown>>, body: () => Async<T>): Promise<T> { | |
| const unlock = await lock(); | |
| const result = await body(); | |
| await unlock(); | |
| return result; | |
| } |
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 Map(content) { | |
| this._keys = []; | |
| this._values = []; | |
| this.length = 0; // specification | |
| if (content != null) { // null or undefined | |
| for (var key in content) { | |
| var pair = content[key]; | |
| this.set(pair[0], pair[1]); | |
| } |
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 Class() {} | |
| Class.extend = function (desc) { | |
| // Реализовать данный метод | |
| var Child = function () { | |
| desc.constructor.apply(this, arguments); | |
| } | |
| Child.prototype = Object.create(this.prototype); | |
| for (var key in desc) { | |
| if (key === 'constructor') continue; |
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
| /** | |
| * Generic curry function | |
| * @param {Function} f A JS function to curry | |
| * @param {Number | void} n Minumal argument count to call function | |
| * @param {Array | void} bound Bound arguments | |
| * @example | |
| * const f = curry((a, b, c) => a + b * c); | |
| * f(1, 2)(2) // 5 | |
| * f()(1)(2)()(2, 1000) // 5 | |
| * f(1, 2, 2) // 5 |
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 btn = document.createElement('div'); | |
| 'tlid-input-button input-button header-button text-icon'.split(' ').map(c => btn.classList.add(c)); | |
| btn.innerHTML = '<div class="text">Вжух</div>'; | |
| btn.addEventListener('click', function transform() { | |
| const tx = document.getElementById('source'); | |
| const lines = tx.value.split('\n'); | |
| tx.value = lines | |
| .map(l => l.trim()) | |
| .map(l => l.endsWith('-') ? l.substr(0, l.length - 1) : l + ' ') |
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
| class DBN { | |
| constructor(n) { this.n = n; } | |
| } | |
| class Pair { | |
| constructor(x, y) { this.x = x; this.y = y; } | |
| toString() { return `[${this.x}, ${this.y}]`; } | |
| } | |
| class BinOpr { | |
| constructor(op) { this.name = op; } | |
| } |