// ==UserScript== // @name VNDB advsearch VN labels columns changer // @match https://vndb.org/v // @match https://vndb.org/c // @match https://vndb.org/v?* // @match https://vndb.org/c?* // @match https://vndb.org/i* // @match https://vndb.org/g* // @grant none // @version 0.1 // @author mertvn // @run-at document-idle // ==/UserScript== const numColumns = 3; async function sleep(ms) { await new Promise((r) => setTimeout(r, ms)); } (async function main() { try { const h3s = document.querySelectorAll('div[id^=xsearch_field] > div > div > div.advheader > h3'); // console.log({ h3s }); for (h3 of h3s) { // console.log({ h3 }); if (h3.textContent == 'VN labels') { // console.log('found correct h3'); const ul = h3.parentNode.nextSibling; // console.log({ ul }); ul.style.columns = numColumns; await sleep(1000) } } } catch {} await sleep(300); await main(); }());