Set properties
const locked = set(body.style, 'overflow', 'hidden')
('background-color', '#eee')
('user-select', 'none');
Reset original values
const getUrlDomainPart = (url) => { | |
const [part] = url.match(/^https?:\/\/[^\/]+\//) || []; | |
return part; | |
}; | |
export const getCurrentUrl = () => { | |
const url = window.location.href; |
/* | |
1. go to your inventory and open developers panel, networking tab | |
2. use one item | |
3. replace <USER_ID> with your ID and <SESSION_ID> with sessionid from "ajaxactivateconsumable" request | |
4. run this script from console | |
I don't have all classid's but you may search for them in inventoy data response | |
*/ | |
fetch('https://steamcommunity.com/inventory/<USER_ID>/753/6?l=english&count=2000') | |
.then((response) => response.json()) |
source.js |
/* | |
READ CURATOR LIST | |
*/ | |
((list) => { | |
const readApps = () => { | |
document | |
.querySelectorAll('.recommendation') | |
.forEach((node) => { | |
const item = { | |
appId: node.querySelector('a[data-ds-appid]').dataset.dsAppid, |
source.js |
Simple functional component that uses regular expression to add zero-width spaces to a string passed into value property and/or children. Zero-width spaces are used to add line breaks which appear when text does not fit into container. It can be used with value property
import SpaceWrap from '@actualwave/react-space-wrap';
export const MyText = () => (
import React, { createContext } from 'react'; | |
import { ErrorHandler } from './withDidCatch'; | |
const { Provider, Consumer } = createContext(); | |
Provider.displayName = 'ErrorBoundaryContextProvider'; | |
Consumer.displayName = 'ErrorBoundaryContextConsumer'; | |
export const ErrorBoundaryProvider = ({ onRenderError }) => ( | |
<Provider value={onRenderError}>{children}</Provider> |
document | |
.querySelectorAll('.product-row__price.product-row__alignment') | |
.forEach((row) => { | |
const node = row.querySelector('.product-row-price--old ._price'); | |
const oldPrice = parseFloat(node.innerText); | |
const newPrice = parseFloat( | |
row.querySelector('.product-row-price--new ._price').innerText, | |
); | |
node.innerText = ` ${((1 - newPrice / oldPrice) * 100) >> 0}%`; | |
node.parentElement.style.textDecoration = 'none'; |
` Checkbox, | |
Chip, | |
DataTable, | |
Button, | |
Paragraph, | |
Dialog, | |
Portal, | |
Divider, | |
Text, | |
Drawer, |