gloomers / test

// ==UserScript==
// @name        test
// @namespace   gloomers
// @include     *.traders.lt/*
// @version     1
// @license MIT
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js
// ==/UserScript==

function isForumTopic(url) {
    var pathname = new URL(url).pathname;
    console.log('TR: ' + pathname);
    return pathname == 'forums.php';
}

function hasForumTopicList() {
    return true;
}

function removeIgnoredForumTopics() {
    console.log('TR: remove ignored forum topics');
}

function addIgnoreButton() {
    console.log('TR: adding ignore button');
}

jQuery.noConflict();

jQuery(document).ready(function() {
    if(hasForumTopicList()) {
        removeIgnoredForumTopics();
    }
    
    if(isForumTopic(document.URL)) {
        addIgnoreButton();
    }
});