// ==UserScript== // @name HCBBS Fix // @namespace https://scriptcat.org/ // @version 1 // @description Fix functions such as deteting and editing posts of HCBBS. // @author firetree // @match https://hcbbs.eu.org/* // @require https://scriptcat.org/lib/513/2.0.0/ElementGetter.js // @grant none // @license cc0 // ==/UserScript== (function() { 'use strict'; elmGetter.each('[href]', document, (/**@type {HTMLElement}*/el) => { el.setAttribute('href', el.getAttribute('href').replace(/^\? (.*)$/, `?$1`)) }); elmGetter.each('[data-href]', document, (/**@type {HTMLElement}*/el) => { el.dataset.href = el.dataset.href.replace(/^\? (.*)$/, `?$1`) }); })();