Skip to content

Instantly share code, notes, and snippets.

View mikhailsdv's full-sized avatar
🍑
Eating

Mikhail Saidov mikhailsdv

🍑
Eating
View GitHub Profile
@mikhailsdv
mikhailsdv / object-to-x-www-form-urlencoded-converter.js
Created August 22, 2023 13:57
Convert multidimensional JavaScript object to x-www-form-urlencoded request object.
const convert = function(arr, startPath = "") {
const getType = q => Object.prototype.toString.call(q);
function converter(list, path, result = {}) {
for (let key in list) {
let _path = `${path}[${key}]`;
let item = list[key];
let typeVal = getType(item);
if (("[object Array]" === typeVal) || ("[object Object]" === typeVal)) {
converter(item, _path, result);
@mikhailsdv
mikhailsdv / tampermonkey-black-hole-extension.js
Last active November 26, 2022 18:14
Send any image to your Black Hole by pressing Ctrl + Q
// ==UserScript==
// @name Black Hole image downloader
// @version 1.0
// @description Send any image to your Black Hole by pressing Ctrl + Q
// @author https://github.com/mikhailsdv
// @license MIT
// @match https://*/*
// @match http://*/*
// @icon https://iili.io/HFm563g.png
// @grant GM_getValue
@mikhailsdv
mikhailsdv / Neural Meduza.js
Last active November 30, 2022 01:42
Neural Meduza (@neuralmeduza) iOS widget by @FilteredInternet
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-brown; icon-glyph: newspaper;
const widgetFamilies = {
small: {
logo: {
width: 28,
height: 10,
marginRight: 6,
},
// ==UserScript==
// @name Tailwind copy classes
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Copy Tailwind classes to clipboard by clicking them.
// @author https://github.com/mikhailsdv
// @match https://tailwindcss.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tailwindcss.com
// @grant none
// ==/UserScript==
@mikhailsdv
mikhailsdv / whatsapp-window-manager.js
Last active December 1, 2022 02:05
Closes dead WhatsApp windows and quickly opens chats by url
// ==UserScript==
// @name WhatsApp window manager
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Closes dead WhatsApp windows and quickly opens chats by url
// @author mikhailsdv
// @match https://*.whatsapp.com/*
// @grant window.close
// ==/UserScript==
@mikhailsdv
mikhailsdv / hack-random-for-castlots.js
Created April 25, 2022 10:00
Hack Random for castlots.org
// ==UserScript==
// @name Hack Random for castlots.org
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://castlots.org/generator-sluchajnyh-chisel/
// @icon https://www.google.com/s2/favicons?sz=64&domain=castlots.org
// @grant none
// ==/UserScript==
@mikhailsdv
mikhailsdv / hack-random-for-randstuff.js
Last active May 27, 2024 17:13
Hack Random for randstuff.ru
// ==UserScript==
// @name Hack Random for randstuff.ru
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author mikhailsdv
// @match https://randstuff.ru/number/
// @icon https://www.google.com/s2/favicons?sz=64&domain=randstuff.ru
// @grant none
// ==/UserScript==