fmm / RetailPath hide completed annotations

// ==UserScript==
// @name         RetailPath hide completed annotations
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  RetailPath hide completed annotations
// @author       fmm
// @match        https://metcash.retailpath.com.au/*
// @license      MIT
// @updateURL    https://openuserjs.org/meta/fmm/RetailPath_hide_completed_annotations.meta.js
// ==/UserScript==

(function() {
    'use strict';

    var completedAnnotations = document.querySelectorAll('.annotation').forEach(function(annotation) {
        if (annotation.getElementsByClassName("infoChangeLog").length > 0) {
            console.log("found!");
            annotation.classList.add("hidden", "completed");

            annotation.onclick = function() {
                annotation.classList.toggle("hidden");
            }
        }
    });
})();