Skip to content

Instantly share code, notes, and snippets.

View 1nathanliang's full-sized avatar
💼
Searching for internships!

nathan liang 1nathanliang

💼
Searching for internships!
View GitHub Profile
@rg089
rg089 / stopwords.txt
Created July 15, 2021 14:48
A List of English Stopwords
0o
0s
3a
3b
3d
6b
6o
a
a1
a2
@marketinview
marketinview / displayTextInputWordCount.js
Last active November 27, 2023 17:57
Qualtrics: Display count of words in a text entry box. Option to limit number of words. #qualtrics #js #jq #text #count #word #limit
Qualtrics.SurveyEngine.addOnload(function() {
var maxWords = 0; //update as needed, 0=no limit
var q = jQuery("#"+this.questionId);
var input = q.find(".InputText");
input.after("<div style='font-size:0.8em;float:right'>Word count: <span class='wordCount'>0</span><span class='maxWords'></span></div>");
var display = q.find(".wordCount");
if(maxWords > 0) q.find('.maxWords').text("/"+maxWords);
countWords(input.get(0));
input.on("input", function() { countWords(this) });
input.blur(function() { this.value = this.value.trim(); });