<commit_before><hr>
<style>
    #queue-priority { width:3ch; text-align:center; }
</style>
<script>
$(document).ready(function (){
    $("#queue-add").click(function (){
        $("#queue-output").text("");
        $("#queue-output").css({opacity: 0});
        var wozzt_info = {};
        var queue_board = world.boards[board_number];
        wozzt_info.file_id = {{file.id|default:"0"}};
        wozzt_info.zzt_file = filename;
        wozzt_info.board = board_number;
        wozzt_info.board_name = queue_board.title;
        wozzt_info.dark = queue_board.dark;
        wozzt_info.zap = queue_board.zap;
        wozzt_info.shot_limit = queue_board.max_shots;
        wozzt_info.time_limit = queue_board.time_limit;
        wozzt_info.priority = $("#queue-priority").val();
        wozzt_info.category = "wozzt";
        wozzt_info.csrfmiddlewaretoken = $("input[name=csrfmiddlewaretoken]").val();
        wozzt_info.b64img = document.getElementById("world-canvas").toDataURL();

        $.ajax({
        url:"/ajax/wozzt_queue_add/",
        method:"POST",
        data:wozzt_info
        }).done(function (resp){
            $("#queue-output").text(resp);
            $("#queue-output").animate({opacity: 1, }, 400);
        });
    });

    $("#hide-player").click(function (){
        var x = world.boards[board_number].stats[0].x - 1;
        var y = world.boards[board_number].stats[0].y - 1;
        print(ctx, 32, 0, x, y);
    });

    $("#set-screen").click(function (){
        console.log("Setting screenshot...");
        data_url = document.getElementById("world-canvas").toDataURL();
        $("#b64img").val(data_url);
        $("#screenshot-submit").click();
    });
});
</script>
<b>Staff Functions</b>
<br><br>
<div>
    {% csrf_token %}
    <input type="button" id="queue-add" value="Add to WoZZT Queue">
    Priority: <input id="queue-priority" maxlength="2" value="1">
    <span id="queue-output" class="cp437"></span>
    <br>
    <input type="button" id="hide-player" value="Hide Player">
    <br>
    <input type="button" id="set-screen" value="Set As Screenshot">

    <hr>
    <form method="POST" id="screenshot-form" action="/tools/set_screenshot/{{file.id}}/" style="display:none">
        {% csrf_token %}
        <button id="debug-screenshot">Set Screenshot</button>
        <input type="hidden" name="b64img" id="b64img">
        <input type="submit" id="screenshot-submit" style="display:none">
    </form>
</div><commit_msg>Update default priority for WoZZT screens<commit_after><hr>
<style>
    #queue-priority { width:3ch; text-align:center; }
</style>
<script>
$(document).ready(function (){
    $("#queue-add").click(function (){
        $("#queue-output").text("");
        $("#queue-output").css({opacity: 0});
        var wozzt_info = {};
        var queue_board = world.boards[board_number];
        wozzt_info.file_id = {{file.id|default:"0"}};
        wozzt_info.zzt_file = filename;
        wozzt_info.board = board_number;
        wozzt_info.board_name = queue_board.title;
        wozzt_info.dark = queue_board.dark;
        wozzt_info.zap = queue_board.zap;
        wozzt_info.shot_limit = queue_board.max_shots;
        wozzt_info.time_limit = queue_board.time_limit;
        wozzt_info.priority = $("#queue-priority").val();
        wozzt_info.category = "wozzt";
        wozzt_info.csrfmiddlewaretoken = $("input[name=csrfmiddlewaretoken]").val();
        wozzt_info.b64img = document.getElementById("world-canvas").toDataURL();

        $.ajax({
        url:"/ajax/wozzt_queue_add/",
        method:"POST",
        data:wozzt_info
        }).done(function (resp){
            $("#queue-output").text(resp);
            $("#queue-output").animate({opacity: 1, }, 400);
        });
    });

    $("#hide-player").click(function (){
        var x = world.boards[board_number].stats[0].x - 1;
        var y = world.boards[board_number].stats[0].y - 1;
        print(ctx, 32, 0, x, y);
    });

    $("#set-screen").click(function (){
        console.log("Setting screenshot...");
        data_url = document.getElementById("world-canvas").toDataURL();
        $("#b64img").val(data_url);
        $("#screenshot-submit").click();
    });
});
</script>
<b>Staff Functions</b>
<br><br>
<div>
    {% csrf_token %}
    <input type="button" id="queue-add" value="Add to WoZZT Queue">
    Priority: <input id="queue-priority" maxlength="2" value="10">
    <span id="queue-output" class="cp437"></span>
    <br>
    <input type="button" id="hide-player" value="Hide Player">
    <br>
    <input type="button" id="set-screen" value="Set As Screenshot">

    <hr>
    <form method="POST" id="screenshot-form" action="/tools/set_screenshot/{{file.id}}/" style="display:none">
        {% csrf_token %}
        <button id="debug-screenshot">Set Screenshot</button>
        <input type="hidden" name="b64img" id="b64img">
        <input type="submit" id="screenshot-submit" style="display:none">
    </form>
</div>
{'fraction_non_alphanumeric': 0.18945667541910724, 'fraction_numerical': 0.011108866895576651, 'mean_word_length': 3.039151712887439, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 0, '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': '2560155', 'n_tokens_mistral': 1708, 'n_tokens_neox': 1672, 'n_words': 256}