Beamdog thread ignore script

Blocks specified threads or subforums on the Beamdog forums

2017-12-30 기준 버전입니다. 최신 버전을 확인하세요.

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

You will need to install an extension such as Tampermonkey to install this script.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name        Beamdog thread ignore script
// @namespace   https://greasyfork.org
// @description Blocks specified threads or subforums on the Beamdog forums
// @include     https://forums.beamdog.com/*
// @version     1
// @grant       none
// @run-at      document-ready
// ==/UserScript==

// With this script you can ignore threads. These threads will be ignored on the "Recent Discussions" page
// AND on their respective subforum discussion page.
// You can also choose to ignore a subforum. ALL the threads from ALL subforums with that name will be ignored on the "Recent Discussions" page

// Add the title of a thread to this list. Enclose the thread's title with double quotes.
// Separate different thread titles by a comma.
var threadlist = [
   "Guess Facts about the Next Poster", "Finally an ignore feature!"
];

// Add the name of a subforum to this list in the same way as above. ATTENTION! On our forum there are multiple subforums
// that have the same name. If you enter a name in this list, then ALL the threads from ALL the subforums with that
// name will be ignored!
var subforumlist =[
    
];

var threadsToDelete = document.querySelectorAll(".Title");
var subforumsToDelete = document.querySelectorAll(".Category a");

var url = window.location.href;
var sub1 = "discussion";
var sub2 = "categories";

// case: URL contains "discussion"
if (url.indexOf(sub1) !== -1 ) {

	//delete subforums
    for (var i=0; i < subforumsToDelete.length; i++) {
        if (subforumlist.indexOf(subforumsToDelete[i].textContent) > -1) {
           subforumsToDelete[i].parentNode.parentNode.parentNode.parentNode.style.display = 'none';
        }
    }
	
}

//case: URL contains "discussion" OR "categories"
if (url.indexOf(sub1) !== -1 || url.indexOf(sub2) !== -1){
    
    //delete threads 
      for (var i=0; i < threadsToDelete.length; i++) {
        if (threadlist.indexOf(threadsToDelete[i].textContent) > -1) {
           threadsToDelete[i].parentNode.parentNode.parentNode.style.display = 'none';
        }
    }
}