Re-enable Spellcheck on Duolingo

This re-enables spellcheck on textareas on Duolingo where it's disabled

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey to install this script.

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Re-enable Spellcheck on Duolingo
// @namespace    mailto:[email protected]
// @version      0.4
// @description  This re-enables spellcheck on textareas on Duolingo where it's disabled
// @author       GooseSerbus
// @match        http*://www.duolingo.com/*
// @license      MIT
// ==/UserScript==

function loop() {
    enableSpellCheck();
	setTimeout(function() {
		loop();
	}, 1000);
}

function enableSpellCheck() {
    var snapshot = document.evaluate('//@spellcheck', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
    for (var i = 0; i < snapshot.snapshotLength; ++i) {
        snapshot.snapshotItem(i).nodeValue = 'true';
    }
}

loop();