弄りたい人向け(>>189>>197

// 強引に全タグを対象にしているところ
// 文字色、背景色の条件が適当かつ不安
function 反転() {
document.querySelectorAll('*').forEach(要素 => {
const スタイル = window.getComputedStyle(要素);
const 文字色 = スタイル.getPropertyValue('color');
const 背景色 = スタイル.getPropertyValue('background-color');
if (文字色.match(/\d+/g).slice(0, 3).every(値 => parseInt(値) < 20)) {
要素.style.setProperty('color', 'white', 'important');
}
if (背景色.match(/\d+/g).slice(0, 3).every(値 => parseInt(値) > 240)) {
要素.style.setProperty('background-color', 'black', 'important');
}
});
}
反転();

// form部分(宝箱ページにあるやつ)を省略
function バッグ() {
const 宝箱 = '<form 省略><input 省略></form>';
document.querySelectorAll('h3').forEach(要素 => {
if (要素.textContent == 'アイテムバッグ:') {
要素.insertAdjacentHTML('afterend', 宝箱);
要素.scrollIntoView();
return;
}
});
}
バッグ();