Skip to content

Instantly share code, notes, and snippets.

View crashmax-dev's full-sized avatar
:octocat:
Meow

Vitalij Ryndin crashmax-dev

:octocat:
Meow
  • Russia
  • 11:33 (UTC +08:00)
View GitHub Profile
import { entries } from '@zero-dependency/utils'
type LogMethod = 'debug' | 'log' | 'warn' | 'error'
const colors: Record<LogMethod, string> = {
debug: `#7f8c8d`,
log: `#2ecc71`,
warn: `#f39c12`,
error: `#c0392b`
}
const whitelist = [
{
uuid: 'dfeed5c9-ea1d-3006-9690-4ae6fd4379e6',
name: 'mndzk'
},
{
uuid: '83425100-5501-303a-a132-df4f554b079d',
name: 'MrPandir'
},
{
// ==UserScript==
// @name Improve Imgur
// @version 0.2
// @author crashmax
// @match https://imgur.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=imgur.com
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle(`
import 'reflect-metadata'
import { databaseTokens } from './database/index.js'
import { ApiService } from './twitch/api.service.js'
import { AuthService } from './twitch/auth.service.js'
const authService = new AuthService(databaseTokens)
await authService.init()
const apiService = new ApiService(authService)
type Data = Record<string, any>
type KeyOf<T> = Extract<keyof T, string>
type Listener<T = any> = (value: T, action: ObserveAction) => void
enum ObserveAction {
Read = 'read',
Write = 'write'
}
class ObserveValue<T extends Data> {
// ==UserScript==
// @name Terraria Wiki Redirect
// @author crashmax
// @match https://terraria.fandom.com/ru/wiki/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=terraria.org
// @grant none
// @run-at document-start
// ==/UserScript==
const NEW_WIKI_HREF = 'https://terraria-game.fandom.com/ru/wiki/'
package main
import (
"fmt"
"github.com/rprtr258/simpdb"
)
type Emote struct {
Name string `json:"name"`
function ffz_init(){if(!document.querySelector("#ffz_script")){var e=document.createElement("script");if(e.id="ffz_script",e.type="text/javascript",e.src="//cdn.frankerfacez.com/script/script.min.js?_="+Date.now(),"true"==localStorage.ffzDebugMode){var r=new XMLHttpRequest;return r.open("GET","//localhost:8000/dev_server",!0),r.onload=function(n){var t=JSON.parse(r.responseText);console.log("FFZ: Development Server is present. Version "+t.version+" running from: "+t.path),e.src="//localhost:8000/script/script.js?_="+Date.now(),document.body.classList.add("ffz-dev"),document.head.appendChild(e)},r.onerror=function(r){console.log("FFZ: Development Server is not present. Using CDN."),document.head.appendChild(e)},r.send(null)}document.head.appendChild(e)}}ffz_init();
let command = null
const observer = new MutationObserver(() => {
const player = document.querySelector('#ytd-player')
if (player && !command) {
command = player.player_
.getPlaylist()
.reduce(
(acc, videoId) => {
acc.push(`youtu.be/${videoId}`)
return acc
[
"Зеленая миля",
"Список Шиндлера",
"Побег из Шоушенка",
"Форрест Гамп",
"Властелин колец: Возвращение короля",
"Властелин колец: Братство Кольца",
"Тайна Коко",
"Властелин колец: Две крепости",
"Назад в будущее",