Created
June 18, 2014 18:19
-
-
Save rickcnagy/64d96aee8b69db777c3e to your computer and use it in GitHub Desktop.
LanguageOn QS Embed JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qsMatchLabels = ["Questions or Comments"] | |
var loadingForTextareaReplace = setInterval(function() { | |
if (typeof _qs$ !== "undefined" && _qs$(".qslabel").length) { | |
clearInterval(loadingForTextareaReplace); | |
qsTextAreas(); | |
moveComments(); | |
} | |
}, 10); | |
function qsTextAreas() { | |
for (var i = 0; i < qsMatchLabels.length; i++) { | |
var label = qsMatchLabels[i]; | |
var input = _qs$(".qslabel:contains(" + label +")").next(".qsinput"); | |
if (input.length) { | |
input.html(input.html().replace("input", "textarea")); | |
} | |
} | |
} | |
function moveComments() { | |
var comments = _qs$(".qslabel:contains(Comments)"); | |
comments = comments.add(comments.next(".qsinput")); | |
comments.detach(); | |
comments.insertAfter(_qs$(".qsspace:last")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment