// ==UserScript==
// @name        WaniKani: I Don't know button
// @namespace   wk-wakaran
// @version     1.0
// @author Niklas Barsk
// @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();

@@ -503,17 +503,20 @@
 ) %7B%0A    
-%09
+    
 document
@@ -559,26 +559,53 @@
 ue=%22
-I have no clue T_T
+Aargh! What does that even mean? (%E2%95%AF%C2%B0%E2%96%A1%C2%B0)%E2%95%AF%EF%B8%B5 %E2%94%BB%E2%94%81%E2%94%BB
 %22;%0A 

Improve English message.