Note to self... You cannot use line breaks when writing JSON strings

This commit is contained in:
alisolarflare 2017-06-15 16:23:51 -06:00
parent 566459b7b8
commit 89ff62f18e
4 changed files with 31 additions and 47 deletions

View file

@ -1,3 +1,3 @@
p, li{ p, li{
font-family: Helvetica; font-family: Helvetica;
} }

View file

@ -1,50 +1,32 @@
/*<li>
<p class="adult">
(question for those over the age of 18... or those mature enough)
</p>
One of your friends is upset. Someone has been harrassing them,
asking for innapropriate pictures, constantly private messaging
them without their consent.
(<em>THEIR NAME IS FUCKING GIO</em>)
Your friend is visibly uncomfortable, what would be your first
action?
<ul>
<li>Try to listen to both sides, see what the other person has to say</li>
<li>Go to the moderators, and report what happened.</li>
<li>Try to cheer up your friend, diverting their attention to something else</li>
<li>Listen to your friend, and reccommend some advice</li>
<li>Other...</li>
</ul>
If this situation is happening to you, what would you choose instead?
<br />
<input type="text" name="" placeholder="Enter response here">
</li>*/
window.onload = function(){ window.onload = function(){
$adultText = $("<p class=\"adult\">(question for those over the age of 18... or those mature enough)</p>"); addScenario = function(object){
$description = $( $adultText = $("<p class=\"adult\">(question for those over the age of 18... or those mature enough)</p>");
"<p>One of your friends is upset. Someone has been harrassing them, asking" $description = $(
+ "for innapropriate photos, constantly private messaging them without consent" "<p>One of your friends is upset. Someone has been harrassing them, asking"
+ "<br><span class=\"aside\">(THEIR NAME IS FUCKING GIO)</span><br>" + "for innapropriate photos, constantly private messaging them without consent"
+ "Your friend is visibly uncomfortable, would would be your first action?</p>"); + "<br><span class=\"aside\">(THEIR NAME IS FUCKING GIO)</span><br>"
+ "Your friend is visibly uncomfortable, would would be your first action?</p>");
$options = $("<ul></ul>"); $options = $("<ul></ul>");
$options.append($("<li>Try to listen to both sides, see what the other person has to say</li>")); $options.append($("<li>Try to listen to both sides, see what the other person has to say</li>"));
$options.append($("<li>Go to the moderators, and report what happened.</li>")); $options.append($("<li>Go to the moderators, and report what happened.</li>"));
$options.append($("<li>Try to cheer up your friend, diverting their attention to something else</li>")); $options.append($("<li>Try to cheer up your friend, diverting their attention to something else</li>"));
$options.append($("<li>Listen to your friend, and reccommend some advice</li>")); $options.append($("<li>Listen to your friend, and reccommend some advice</li>"));
$options.append($("<li>Other...</li>")); $options.append($("<li>Other...</li>"));
$question = $("<p>If this was happening to you, what would you choose instead?</p>") $question = $("<p>If this was happening to you, what would you choose instead?</p>")
$input = $("<input type=\"text\" placeholder=\"Enter response here\">"); $input = $("<input type=\"text\" placeholder=\"Enter response here\">");
$liElement = $("<li id=\"scenarios-harrassment\"></li>") $liElement = $("<li id=\"scenarios-harrassment\"></li>")
$liElement.append($adultText); $liElement.append($adultText);
$liElement.append($description); $liElement.append($description);
$liElement.append($options); $liElement.append($options);
$liElement.append($input); $liElement.append($input);
console.table($liElement); console.table($liElement);
$("#scenarios").append($liElement);
}
$("#scenarios").append($liElement);
}; };

View file

@ -3,8 +3,7 @@
{ {
"name": "base raid", "name": "base raid",
"description": "description":
"You find your base raided: All of your stuff is missing, chests are empty. "You find your base raided: All of your stuff is missing, chests are empty. What would be your first action?",
What would be your first action?",
"options": [ "options": [
"Try to find who stole the goods, and try to get it back", "Try to find who stole the goods, and try to get it back",
"Go to the moderators, and report what happened", "Go to the moderators, and report what happened",
@ -18,7 +17,7 @@
{ {
"name": "Rule 1", "name": "Rule 1",
"description": "description":
"Someone is breaking Rule #1 and well... being a dick. They'are "Someone is breaking Rule #1 and well... being a dick. They are
angry about (having their base raided/being harrassed by another angry about (having their base raided/being harrassed by another
member/their family treating them unfairly/griefers destroying member/their family treating them unfairly/griefers destroying
their base), and are swearing, insulting people, and generally their base), and are swearing, insulting people, and generally
@ -33,7 +32,7 @@
], ],
"question": "question":
"If you were a moderator, what would you choose instead?", "If you were a moderator, what would you choose instead?",
"adult": false, "adult": false
}, },
{ {
"name": "Harrassment", "name": "Harrassment",

View file

@ -0,0 +1,3 @@
{
"Name": "Ali"
}