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 divider = 3; | |
| let source = new Array(35).fill(0).map((x,i) => i); | |
| new Array(Math.ceil(source.length/divider)).fill(divider).map((x, i) => new Array(x).fill(0).map((y, ii) => source[divider*i+ii])) | |
| } |
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 el = document.querySelector('#default-player > div > div.hover-display.pl-hover-transition-out > div > div.pl-controls-bottom.pl-flex.qa-controls-bottom > div.player-buttons-right > button.player-button.qa-fullscreen-button.pl-mg-r-1.pl-button__fullscreen--tooltip-left'); | |
| const keys = Object.keys(el); | |
| const theirSecretInstance = el[keys[0]]; | |
| const turnOnTheatreMode = theirSecretInstance.memoizedProps.onClick; | |
| turnOnTheatreMode(); // metoda włączająca theatre mode, nie wiem jak zachowa się po podmianie playera |
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 sum = (accountNumber) => { | |
| const parsePriceString = priceStr => parseFloat(priceStr.replace(/\s\w\W/g, '').replace(',', '.'), 2); | |
| const parseToReadablePriceStr = str => parseFloat(str).toFixed('2'); | |
| const cartViewProducts = Array.from(document.querySelectorAll('.cart-view-product')); | |
| const supplyCostStr = document.querySelector('.cart-view-rundown-amount').innerText; | |
| const supplyCost= parsePriceString(supplyCostStr); | |
| class Products { | |
| constructor({ |
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
| <!doctype html> | |
| <html class="no-js" lang=""> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge"> | |
| <title>Test</title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
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 getPropValueByStringPath = (target, str) => { | |
| const path = str.split('.'); | |
| const key = path.shift(); | |
| if(path.length !== 0 && target[key] instanceof Object) | |
| return getPropValueByStringPath(target[key], path.join('.')); | |
| else if(path.length === 0) | |
| return target[key]; | |
| } |
NewerOlder