Sona Systems available studies

Hide studies with no available timeslots on sona-systems websites

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name            Sona Systems available studies
// @description     Hide studies with no available timeslots on sona-systems websites
// @version         1.0
// @namespace       https://www.github.com/sh0oki/sona-hider
// @source          https://www.github.com/sh0oki/sona-hider
// @include         https://*.sona-systems.com/all_exp_participant.aspx
// @copyright       2018, sh0oki
// ==/UserScript==

function mainWrapper() {
    function toggleDisplay() {
        tr_selector = $('table tbody tr:not(:has(a.btn))');
        tr_selector.toggle();
    }

    function main() {
        toggleDisplay();
        $(".m-bot15").after("<div class=\"input-group input-large m-bot15\">" + 
                            "<a href=\"#\" class=\"btn btn-primary btn-xs\" " + 
                            "onclick=\"$('table tbody tr:not(:has(a.btn))').toggle(); return false\">" + 
                            "Toggle Hidden rows</a>" + 
                            "</div>");
    }

    main();
};

$(document).ready(function() {
    mainWrapper()
});