Created
April 27, 2021 02:19
-
-
Save jnothman/92ea1c2e3bbc7911fe7c025ad438bafe to your computer and use it in GitHub Desktop.
UserJS script to put newlines in qualtrics reports
This file contains hidden or 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
// ==UserScript== | |
// @name Show newlines in Sydney U qualtrics reports | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Joel Nothman | |
// @match https://sydney.au1.qualtrics.com/CP/Report.php?* | |
// @icon https://www.google.com/s2/favicons?domain=qualtrics.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
console.log("foo"); | |
var dataElems = document.getElementsByClassName("Data") | |
for (var i in dataElems) { | |
if (dataElems[i].parentElement && /Q_TextResponse/.match(dataElems[i].parentElement.getAttribute("class"))) { | |
dataElems[i].innerHTML = dataElems[i].innerHTML.replace(/\n/g, "<br>") | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment