Skip to content
Snippets Groups Projects
Commit 9bbe211c authored by ands's avatar ands
Browse files

marvin daemon for mplayer and espeak. use: facepalm() or say(text) in js

parent b8b97dff
No related branches found
No related tags found
No related merge requests found
while true; do
if [ -f ../webroot/tmp/facepalm ]
then
rm -f ../webroot/tmp/facepalm > /dev/null
mplayer -display :0 -fs facepalm.flv > /dev/null &
sleep 3
killall mplayer
fi
if [ -f ../webroot/tmp/say ]
then
cat ../webroot/tmp/say | espeak -v german-mbrola-2 > /dev/null
rm -f ../webroot/tmp/say > /dev/null
fi
sleep 1
done
<?php
if(isset($_GET["facepalm"]))
{
exec('touch tmp/facepalm');
}
if(isset($_GET["say"]))
{
exec('echo "'.$_GET["say"].'" > tmp/say');
}
?>
......@@ -18,3 +18,13 @@ $(document).ready(function()
{
minuteTimer = setInterval(executeMinuteTimer, 60*1000);
});
function facepalm()
{
$.get("ajax.php?facepalm=1");
}
function say(text)
{
$.get("ajax.php?say="+text);
}
......@@ -10,7 +10,7 @@ class Logo implements iWidget
public function giveOutput()
{
$widgetOutput = '<img src="widgets/Logo/img/warpzone.png">'."\n";
$widgetOutput = '<img onclick="say(\'Ich bin nur das Logo. Ich kann ja sonst nichts.\')" src="widgets/Logo/img/warpzone.png">'."\n";
return $widgetOutput;
}
}
......
File mode changed from 100644 to 100755
......@@ -11,7 +11,7 @@ class Marvin implements iWidget
public function giveOutput()
{
$widgetOutput = '<script src="widgets/Marvin/Marvin.js" type="text/javascript"></script>'."\n";
$widgetOutput .= '<img id="MarvinImg" src="widgets/Marvin/img/marvin.jpg">'."\n";
$widgetOutput .= '<img id="MarvinImg" onclick="say(\'Wie deprimierend.\')" src="widgets/Marvin/img/marvin.jpg">'."\n";
return $widgetOutput;
}
}
......
File mode changed from 100644 to 100755
......@@ -8,7 +8,7 @@ function fillPrepaid(response) {
content += '<table><tr>';
for(var i=0; i<v; i++) {
if(i == 5) content += '</tr><tr>';
content += '<td class="button" style="background-image:url(widgets/Prepaid/img/cross.png);background-position:center center;">50c</td>';
content += '<td class="button" onclick="facepalm()" style="background-image:url(widgets/Prepaid/img/cross.png);background-position:center center;">50c</td>';
}
for(var i=v; i<10; i++) {
if(i == 5) content += '</tr><tr>';
......@@ -37,6 +37,7 @@ function setPrepaid(k,v) {
$.getJSON("widgets/Prepaid/ajax.php?name="+k+"&value="+v, function (response)
{
fillPrepaid(response);
say("om nom nom");
});
}
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
SuperVirus
2
4
crnf
8
da1l6
10
da1l6
6
Philipp
3
2
Commander1024
6
2
ElliotDenk
0
ands
8
2
StuC
0
8
Deaddy
0
6
phryk
0
fenkt
0
shell
0
6
Mitch
0
8
Cpt.Charisma
0
blueling
......@@ -32,3 +32,11 @@ Fusselkater
0
MrFischer
0
Oliver
10
raichoo
10
alios
4
zeroskillor
4
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment