image & video questions

This commit is contained in:
Astro 2010-09-21 01:37:51 +02:00
parent c583639c49
commit cf9839a222
2 changed files with 37 additions and 2 deletions

View File

@ -1,12 +1,39 @@
[
{ "text": "Wie oft wird ein Backup von ftp.c3d2.de gezogen?",
"tier": 50,
"answers": [ { "text": "Streaming replication" },
{ "text": "RAID1 ohne Crypto" },
{ "text": "Monatlich auf FTP" },
{ "text": "Nie",
"right": true }
] },
{ "text": "Was meint dieses Logo?",
"image": "http://www.c3d2.de/images/ck.png",
"tier": 100,
"answers": [ { "text": "Terroristen" },
{ "text": "Computer Chaos Club" },
{ "text": "C3D2",
"right": true },
{ "text": "Invalides XML",
"right": true }
] },
{ "text": "Wo wurde dieser Film geklaut?",
"video": "http://diveintohtml5.org/i/pr6.ogv",
"tier": 200,
"answers": [ { "text": "Youtube" },
{ "text": "Dive Into HTML5",
"right": true },
{ "text": "Mozilla Labs" },
{ "text": "HTML5Demos.com" }
] },
{ "text": "Как овас?",
"tier": 1000,
"answers": [ { "text": "Орчин хорошо",
"right": true },
{ "text": "Хорошо" },
{ "text": "Не хорошо" },
{ "text": "Исвинизие?" }
] },
{ "text": звините?" }
] },
{ "text": "где выхад?",
"tier": 2000,
"answers": [ { "text": "Я вы́йду о вас" },

View File

@ -112,6 +112,14 @@ function switchToGame() {
$('#question').append('<p></p>');
$('#question p').text(q.text);
}
if (q.image) {
$('#question').append('<img>');
$('#question img').attr('src', q.image);
}
if (q.video) {
$('#question').append('<video controls autoplay>');
$('#question video').attr('src', q.video);
}
for(i = 0; i < 4; i++) {
var answer = q.answers[i];