Skip to content

Instantly share code, notes, and snippets.

View tijnjh's full-sized avatar

tijn tijnjh

  • Utrecht, Europe
  • 07:29 (UTC +01:00)
View GitHub Profile
// ==UserScript==
// @name Quick MR link button
// @namespace http://tampermonkey.net/
// @version 2026-02-09
// @description Copy rich text link for MR
// @author You
// @match https://git.fletcher.build/**/merge_requests/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=fletcher.build
// @require https://cdn.jsdelivr.net/gh/tijnjh/cdnner@a6f1947/dist/main.js
// @grant none
@tijnjh
tijnjh / ref.svelte.ts
Created August 15, 2025 21:45
svelte ref
export interface Ref<T> {
get current(): T
set current(value: T)
}
export function ref<T>(value: T): Ref<T> {
let state = $state<T>(value)
return {
get current() {
// itpipe.js
/**
* Creates a proxy that captures method calls for piping
* @returns {Proxy} The 'it' proxy object
*/
const createItProxy = () => {
return new Proxy({}, {
get: (target, prop) => {
if (typeof prop === 'symbol' || prop === 'inspect') {
return () => {};
function selectListing(name) {
return document.querySelector(`h3[data-tag="${name}"]`);
}
const items = document.querySelectorAll(".opblock-tag-section > h3 > a > span");
let paths = [];
for (const { textContent } of items) {
paths.push(textContent);
}