/* ==UserStyle==
@name           AO3 content warning filter
@namespace      https://www.5snb.club
@version        1.1.0
@description    A persistent way to completely filter out works that match given content warnings
@author         5225225 (https://www.5snb.club)
@license        CC-BY-SA-4.0
@preprocessor stylus
@var checkbox chooseNotToUseArchiveWarnings "Hide Creator Chose Not To Use Archive Warnings" 0
@var checkbox graphicDepictionsOfViolence "Hide Graphic Depictions Of Violence" 0
@var checkbox majorCharacterDeath "Hide Major Character Death" 0
@var checkbox rapeNonCon "Hide Rape/Non-Con" 0
@var checkbox underage "Hide Underage Sex" 0
==/UserStyle== */

/*
History

1.0.0: Initial commit.
1.1.0: "Underage" filter fixed (AO3 changed the tag to be "Underage Sex")
*/

@-moz-document domain("archiveofourown.org") {
    if chooseNotToUseArchiveWarnings {
        li.blurb:has(li.warnings a.tag[href="/tags/Choose%20Not%20To%20Use%20Archive%20Warnings/works"]) {
            display: none;
        }
    }

    if graphicDepictionsOfViolence {
        li.blurb:has(li.warnings a.tag[href="/tags/Graphic%20Depictions%20Of%20Violence/works"]) {
            display: none;
        }
    }

    if majorCharacterDeath {
        li.blurb:has(li.warnings a.tag[href="/tags/Major%20Character%20Death/works"]) {
            display: none;
        }
    }

    if rapeNonCon {
        li.blurb:has(li.warnings a.tag[href="/tags/Rape*s*Non-Con/works"]) {
            display: none;
        }
    }

    if underage {
        li.blurb:has(li.warnings a.tag[href="/tags/Underage%20Sex/works"]) {
            display: none;
        }
    }
}
