UNPKG

@caspingus/lt

Version:

A utility library of helpers and extensions useful when working with Learnosity APIs.

21 lines (20 loc) 1.06 kB
import { r as e, t } from "../../extensionsFactory-hk5ijx1G.js"; //#region src/assessment/extensions/validation/blockGrammarChecks/index.js function n() { t.eventBus.on("item:load", r, "blockGrammarChecks"), t.hasAnnotations() && ["notepad:toggleVisibility", "stickynote:add"].forEach((e) => t.annotationsApp().on(e, r)); } function r() { let e = ["lrn_texteditor_editable"], t = document.getElementById("learnosity_assess"); for (let n = 0; n < e.length; n++) { let r = t.getElementsByClassName(e[n]); if (r.length) for (let e = 0; e < r.length; e++) i(r[e]); } let n = t.getElementsByTagName("textarea"); for (let e = 0; e < n.length; e++) i(n[e]); } function i(e) { e.setAttribute("data-gramm", "false"), e.setAttribute("data-gramm_editor", "false"), e.setAttribute("data-enable-grammarly", "false"), e.setAttribute("spellcheck", "false"), e.setAttribute("autocorrect", "false"), e.setAttribute("autocomplete", "false"), e.setAttribute("autocapitalize", "false"); } var a = e("blockGrammarChecks", n); //#endregion export { a as blockGrammarChecks };