NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @namespace https://openuserjs.org/users/skitter.suntour
// @name Dojo whitelist
// @version 0.0.1
// @description 指定した投稿者の投稿のみを表示するスクリプト。
// @author skitter.suntour
// @copyright 2021,skitter.suntour(https://openuserjs.org/users/skitter.suntour)
// @license MIT
// @match https://engawa.kakaku.com/*
// @icon
// @grant none
// ==/UserScript==
(function() {
'use strict';
//以下の例のように表示したい投稿者名をカンマ区切りの配列で指定する。
//例)
//let whitelist = ['skitter', 'ディープ・ インパクト'];
let whitelist = [];
let titles = document.getElementsByClassName('title');
for(let i = 0; i < titles.length; i += 1) {
if (titles[i].getElementsByTagName('a').length > 0){
let handle = titles[i].getElementsByTagName('a')[0].innerText.trim();
if (!whitelist.includes(handle)){
titles[i].parentNode.style.display='none';
continue;
}
} else {
titles[i].parentNode.style.display='none'; //ついでに削除済の投稿を非表示にする。
}
}
})();