<commit_before>///<reference path='refs.ts'/>

module TDev.AbuseReview
{
    var root:HTMLElement;
    var scroll:HTMLElement;
    var pg:Browser.AbuseReportsPage;

    export function show()
    {
        if (!root) {
            var resolved = 
                HTML.mkButton(lf("resolved: shown"), () => {
                    if (root.getAttribute("data-hideresolved") == "yes") {
                        resolved.setChildren(lf("resolved: shown"))
                        root.setAttribute("data-hideresolved", "no")
                    } else {
                        resolved.setChildren(lf("resolved: hidden"))
                        root.setAttribute("data-hideresolved", "yes")
                    }
                })
            root = div("abuseReview",
                HTML.mkButton(lf("abuse reports"), () => {
                    show();
                }),
                HTML.mkButton(lf("refresh"), () => {
                    refresh();
                }),
                resolved,
                HTML.mkButton(lf("dismiss"), () => {
                    hide();
                }),
                scroll = div("scroll"))
            elt("root").appendChild(root)
            pg = new Browser.AbuseReportsPage(Browser.TheHost);
            scroll.setChildren(pg.initOverlay())
        }

        ModalDialog.dismissCurrent()<commit_msg>Rename 'dismiss' button in abuse review; resolves https://github.com/bbc/microbit-extras/issues/2292<commit_after>///<reference path='refs.ts'/>

module TDev.AbuseReview
{
    var root:HTMLElement;
    var scroll:HTMLElement;
    var pg:Browser.AbuseReportsPage;

    export function show()
    {
        if (!root) {
            var resolved = 
                HTML.mkButton(lf("resolved: shown"), () => {
                    if (root.getAttribute("data-hideresolved") == "yes") {
                        resolved.setChildren(lf("resolved: shown"))
                        root.setAttribute("data-hideresolved", "no")
                    } else {
                        resolved.setChildren(lf("resolved: hidden"))
                        root.setAttribute("data-hideresolved", "yes")
                    }
                })
            root = div("abuseReview",
                HTML.mkButton(lf("abuse reports"), () => {
                    show();
                }),
                HTML.mkButton(lf("refresh"), () => {
                    refresh();
                }),
                resolved,
                HTML.mkButton(lf("minimize"), () => {
                    hide();
                }),
                scroll = div("scroll"))
            elt("root").appendChild(root)
            pg = new Browser.AbuseReportsPage(Browser.TheHost);
            scroll.setChildren(pg.initOverlay())
        }

        ModalDialog.dismissCurrent()
{'fraction_non_alphanumeric': 0.13542409123307197, 'fraction_numerical': 0.0014255167498218105, 'mean_word_length': 1.362794612794613, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4400864', 'n_tokens_mistral': 754, 'n_tokens_neox': 679, 'n_words': 104}