<commit_before>// ==UserScript==
// @name        WaniKani: I Don't know button
// @namespace   wk-wakaran
// @version     1.0
// @author <NAME>
// @description Adds an "I don't know the answer" button to reviews. When clicked it will submit an incorrect answer.
// @include     https://www.wanikani.com/review/session*
// @run-at      document-end
// @updateURL https://raw.githubusercontent.com/nibarius/wk-wakaran/master/wk-wakaran.user.js
// ==/UserScript==

function onDontKnowClick(e) {
    if (isMeaning()) {
    	document.getElementById("user-response").value="I have no clue T_T";
    }
    else {
        document.getElementById("user-response").value="えぇぇ！。。。さっぱりわからないぃぃぃ。・ﾟﾟ･（≧д≦）･ﾟﾟ･｡";
    }
}

function isMeaning() {
    return document.getElementById("question-type").className == "meaning";
}

function addDontKnowButton() {
  	var dontKnowButton = document.createElement("b");
  	dontKnowButton.innerHTML = "?";
  	dontKnowButton.setAttribute("style", "margin-left: 0.5em");
    dontKnowButton.onclick = onDontKnowClick;
  	document.getElementById("answer-form").getElementsByTagName("button")[0].appendChild(dontKnowButton);
}

addDontKnowButton();<commit_msg>Improve English message.<commit_after>// ==UserScript==
// @name        WaniKani: I Don't know button
// @namespace   wk-wakaran
// @version     1.0
// @author <NAME>
// @description Adds an "I don't know the answer" button to reviews. When clicked it will submit an incorrect answer.
// @include     https://www.wanikani.com/review/session*
// @run-at      document-end
// @updateURL https://raw.githubusercontent.com/nibarius/wk-wakaran/master/wk-wakaran.user.js
// ==/UserScript==

function onDontKnowClick(e) {
    if (isMeaning()) {
        document.getElementById("user-response").value="Aargh! What does that even mean? (╯°□°)╯︵ ┻━┻";
    }
    else {
        document.getElementById("user-response").value="えぇぇ！。。。さっぱりわからないぃぃぃ。・ﾟﾟ･（≧д≦）･ﾟﾟ･｡";
    }
}

function isMeaning() {
    return document.getElementById("question-type").className == "meaning";
}

function addDontKnowButton() {
  	var dontKnowButton = document.createElement("b");
  	dontKnowButton.innerHTML = "?";
  	dontKnowButton.setAttribute("style", "margin-left: 0.5em");
    dontKnowButton.onclick = onDontKnowClick;
  	document.getElementById("answer-form").getElementsByTagName("button")[0].appendChild(dontKnowButton);
}

addDontKnowButton();
{'fraction_non_alphanumeric': 0.164372131831456, 'fraction_numerical': 0.004171881518564873, 'mean_word_length': 4.080508474576271, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '5960278', 'n_tokens_mistral': 911, 'n_tokens_neox': 848, 'n_words': 142}