-
Notifications
You must be signed in to change notification settings - Fork 2
/
index2.html
executable file
·115 lines (105 loc) · 2.97 KB
/
index2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE HTML>
<html>
<head>
<title>The Fancifier</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type='text/javascript' src='./jwplayer/jwplayer.js'></script>
<script type="text/javascript">
$(document).ready(function(){
$('#mediaContainer').hide();
$('#twitterButton').click(function() {
$('#mediaContainer').hide();
$.ajax({
type: "POST",
url: "twitter.php",
success: function(response){
$('#text').val(response);
}
});
});
$('#fancify').submit(function() {
var input = $('#text').attr('value');
var type = $('input:radio[name=fancyType]:checked').val();
$('#mediaContainer').hide();
$('#rightCol p').empty();
//$('#rightCol p').append(input);
/*
if(type == 'fancify'){
$('#mediaContainer').hide();
}
else{
$('#mediaContainer').show();
}
*/
$.ajax({
type: "POST",
url: "fancify.php",
data: "type=" + type + "&input=" + input,
success: function(response){
$('#rightCol p').append(response);
$('#mediaContainer').show();
}
});
return false;
});
});
</script>
</head>
<body>
<div id="wrapper">
<div id="header">
<div class="innerWrapper">
<h1><a href="index2.html">the fancifier</a></h1>
</div>
</div>
<div id="subHead">
<div class="innerWrapper">
<p>Take your boring text and make it awesome!</p>
</div>
</div>
<div id="content">
<div class="innerWrapper">
<div id="leftCol">
<form name="fancify" id="fancify" method="POST">
<textarea rows="20" cols="50" id="text" placeholder="boring text..."></textarea>
<input type="radio" class="radio" name="fancyType" value="fancify" CHECKED> Fancify
<input type="radio" class="radio" name="fancyType" value="ghettofy"> Ghettofy
<input type="submit" value="Translate" id="button"/>
</form>
<button id="twitterButton" type="button">grab from twitter</button>
<div id="mediaContainer">
<div id="combined"></div>
<div id="music"></div>
</div>
<script type="text/javascript">
jwplayer('combined').setup({
'flashplayer': 'jwplayer/player.swf',
'id': 'text2voice',
'width': '1',
'height': '24',
'autostart': 'true',
'file': 'combined.mp3',
'bufferlength': '8',
'repeat': 'always',
'controlbar': 'bottom'
});
jwplayer('music').setup({
'flashplayer': 'jwplayer/player.swf',
'id': 'backgroundMusic',
'width': '1',
'height': '24',
'autostart': 'true',
'file': 'background.mp3',
'controlbar': 'bottom'
});
</script>
</div>
<div id="rightCol">
<p></p>
</div>
</div>
</div>
</div>
</body>
</html>