Skip to content

Instantly share code, notes, and snippets.

/* eslint-disable no-empty */
// Subscribe to events
chrome.tabs.onRemoved.addListener(OnAnyTabRemoved);
// Spawn offscreen page
// Apaprently it needs to be async to be caugh, for whatever reason
(async () => {
try { await chrome.offscreen.createDocument({ url: '/pages/offscreen.html', reasons: [chrome.offscreen.Reason.CLIPBOARD], justification: ''}); }
catch (error) { console.log(error); }
@Kein
Kein / BANK.bt
Created November 14, 2022 21:32
General overview of modern encrypted FMOD bank/fbs files
//===================
// DEFINITIONS
//===================
typedef struct
{
char MAGIC[4];
uint32 FullSize;
char FMTMAGIC[8];
uint32 Unk1;
uint32 Unk2;
//------------------------------------------------
// File: .bmscc (Scenario Camera Collision)
// Authors: Kein
// Version: 0.1
// History: 0.1 - Initial release
//------------------------------------------------
char magic[4]; // MSCD
int unk0;
int numKeys;
struct
@Kein
Kein / BMSSD.bt
Last active October 29, 2021 16:29 — forked from Warpten/BMSSD.bt
Readability
//---------------------------------------
// Authors: Warpten
// Version: 0.2
// Purpose: Metroid Dread BMSSD
// Category: Metroid Dread
// File Mask:
// ID Bytes:
// History: 0.1 - Initial Version
// 0.2 - readability
//---------------------------------------
@Kein
Kein / MutableString.cs
Created September 23, 2020 04:08
First pass
public class MutableString
{
// Setup fields
private int m_Pos;
private string m_valueStr;
private readonly bool dontThrow = false;
// Publics
public int Capacity { get { return m_valueStr.Length; } }
public int Length { get { return m_Pos; } }
@Kein
Kein / quickreply.js
Last active January 18, 2020 04:43
Quickreply on ctrl+Enter + autodelete on bump + no delete confirmations
// ==UserScript==
// @name QuickReply
// @version 0.0.1
// @description Quick reply on Steam forums
// @author Kein
// @match *://steamcommunity.com/app/*/tradingforum/*/*
// @match *://steamcommunity.com/groups/*/discussions/*
// @match *://steamcommunity.com/app/*/discussions/*/*/*
// @match *://steamcommunity.com/workshop/discussions/*/*/*
// @grant none
@Kein
Kein / topic_highlighter.js
Created January 17, 2020 19:06
Highlights your own topics
// ==UserScript==
// @name Highlighter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Highlights threads posted by you
// @author Kein
// @match *://steamcommunity.com/*/*/discussions/
// @match *://steamcommunity.com/*/*/*/?fp=*
// @match *://steamcommunity.com/app/*/tradingforum/
// @match *://steamcommunity.com/app/*/tradingforum/?fp=*
// ==UserScript==
// @name Wishlist Bulk Remover
// @version 0.1
// @description Removes wishlist items in bulk
// @author Kein
// @match *://store.steampowered.com/wishlist/profiles/*
// @match *://store.steampowered.com/wishlist/id/*
// @grant none
// @run-at document-end
// ==/UserScript==