Skip to content

Instantly share code, notes, and snippets.

View burdiuz's full-sized avatar
💭
isotope muffin

Oleg Galaburda burdiuz

💭
isotope muffin
View GitHub Profile
@burdiuz
burdiuz / README.md
Last active October 2, 2018 13:30
translateJQueryEventsToDOM() - Re-dispatch jQuery events from DOM elements

jQuery events to DOM

Listens for jQuery events to re-dispatch them from DOM element as CustomEvent. To redispatch Bootstrap 4 modal events from modal DOM element

import translateJQueryEventsToDOM from '@actualwave/jquery-events-to-dom';

translateJQueryEventsToDOM()(
  'show.bs.modal',
 'shown.bs.modal',
@burdiuz
burdiuz / README.md
Last active October 6, 2018 21:25
getClass() - Simple function wrapper over `Object.getPrototypeOf()`.

getClass()

Simple function wrapper over Object.getPrototypeOf().
Additionally provides functions to getClassName() and getParentClass().

Demo on jsFiddle.

@burdiuz
burdiuz / README.md
Last active December 4, 2018 05:15
Chained set property

Chained Set Property

Set properties

const locked = set(body.style, 'overflow', 'hidden')
  ('background-color', '#eee')
  ('user-select', 'none');

Reset original values

@burdiuz
burdiuz / index.js
Created December 12, 2018 08:58
Getting redirect URL
const getUrlDomainPart = (url) => {
const [part] = url.match(/^https?:\/\/[^\/]+\//) || [];
return part;
};
export const getCurrentUrl = () => {
const url = window.location.href;
@burdiuz
burdiuz / gogobundle_order.js
Last active December 25, 2018 15:44
GoGoBundle order helper, adds links for keys and titles
((cache={}, list=[]) => {
const fieldsets = document.querySelectorAll('fieldset');
document.body.innerHTML = fieldsets[fieldsets.length - 1].outerHTML;
document.querySelectorAll('table tr td:first-child')
.forEach(item => list.push(item));
document.querySelector('table thead tr').prepend(document.createElement('th'));
list
.reverse()
@burdiuz
burdiuz / index.js
Last active January 3, 2019 13:48
Steam: Use all consumables from Winter Sale 2018 in inventory
/*
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())
@burdiuz
burdiuz / .npmignore
Last active February 4, 2019 21:16
@actualwave/redux-create-reducer
.*
source.js
@burdiuz
burdiuz / copy.js
Last active March 4, 2019 13:10
Steam curation manage -- copy/paste curated reviews
/*
READ CURATOR LIST
*/
((list) => {
const readApps = () => {
document
.querySelectorAll('.recommendation')
.forEach((node) => {
const item = {
appId: node.querySelector('a[data-ds-appid]').dataset.dsAppid,
@burdiuz
burdiuz / GithubSignIn.js
Last active March 11, 2019 22:33
React Native component built to login users and obtain accessToken via callback
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { WebView } from 'react-native';
const WEBVIEW_URL = 'https://github.com/login/oauth/authorize';
const TOKEN_URL = 'https://github.com/login/oauth/access_token';
/*
URL that will be displayed after successful login, it should be different to track URL change, so component can grab code
*/
@burdiuz
burdiuz / .npmignore
Last active March 20, 2019 09:24
@actualwave/redux-promised-action - Promised action creator factory, uses redux-thunk to return promise from dispatch
source.js