MyDealz Toggle Comments

Adds functionallity to toggles cascaded comments on mydealz.de

As of 2016-08-12. See the latest version.

// ==UserScript==
// @name         MyDealz Toggle Comments
// @namespace    http://www.mydealz.de/profile/richi2k
// @version      0.2
// @description  Adds functionallity to toggles cascaded comments on mydealz.de 
// @author       richi2k
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @match        http://www.mydealz.de/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    // hides all quoted content except those without a header
    $(".bbcode_quote_head .bbcode_quote_body").hide();

    // sets 'pointer' as cursor to indicate, that the element is clickable
    $(".bbcode_quote_head").css("cursor", "pointer");
    
    $(".bbcode_quote_head").click(function(){
        // toggles the related content area
        $(this).siblings(".bbcode_quote_body").toggle(); 
    });
    
})();