Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

changed paths to relative (fixed for use with nginx)

  • Loading branch information...
commit d50f84e6f8b7071bff0dad244e4f5bc057c09b1b 1 parent 3e07203
@msoap authored
View
30 mojolicious-radio-box.pl
@@ -467,7 +467,7 @@ sub _cmus_parse_info {
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.3, maximum-scale=2.0, user-scalable=yes"/>
<title>Mojolicious radio box</title>
- <script src="/mojo/jquery/jquery.js"></script>
+ <script src="mojo/jquery/jquery.js"></script>
<script>
// generated from coffee-script source
(function() {
@@ -509,7 +509,7 @@ sub _cmus_parse_info {
}
},
update_info: function() {
- return $.get('/get_info', function(info_data) {
+ return $.get('get_info', function(info_data) {
App.info = info_data.info;
if (App.info.volume != null) {
App.volume = App.info.volume;
@@ -590,17 +590,17 @@ sub _cmus_parse_info {
do_pause: function() {
$("#bt_pause").attr('disabled', 'disabled');
if (App.info.duration > 0) {
- return $.post('/pause', function(info_data) {
+ return $.post('pause', function(info_data) {
App.info = info_data.info;
return App.render_info();
});
} else if (App.info.status === 'playing') {
- return $.post('/stop', function(info_data) {
+ return $.post('stop', function(info_data) {
App.info = info_data.info;
return App.render_info();
});
} else if (App.info.status === 'stopped') {
- return $.post('/play', function(info_data) {
+ return $.post('play', function(info_data) {
App.info = info_data.info;
return App.render_info();
});
@@ -608,34 +608,34 @@ sub _cmus_parse_info {
},
do_next: function() {
$("#bt_next").attr('disabled', 'disabled');
- return $.post('/next', function(info_data) {
+ return $.post('next', function(info_data) {
App.info = info_data.info;
return App.render_info();
});
},
do_prev: function() {
$("#bt_prev").attr('disabled', 'disabled');
- return $.post('/prev', function(info_data) {
+ return $.post('prev', function(info_data) {
App.info = info_data.info;
return App.render_info();
});
},
do_get_radio: function() {
- return $.get('/get_radio', function(result) {
+ return $.get('get_radio', function(result) {
$("#radio_stations").show();
App.radio_stations = result.radio_stations;
return App.render_select_radio();
});
},
do_get_music: function() {
- return $.get('/get_music', function(info_data) {
+ return $.get('get_music', function(info_data) {
App.info = info_data.info;
return App.render_info();
});
},
do_select_radio: function(event) {
if (event.target.value) {
- return $.post('/play_radio', {
+ return $.post('play_radio', {
url: event.target.value
}, function(info_data) {
App.info = info_data.info;
@@ -669,7 +669,7 @@ sub _cmus_parse_info {
if ((new_volume != null) && new_volume !== App.volume) {
App.volume = new_volume;
$("#volume_slider").val(new_volume);
- return $.post('/set_volume/' + new_volume);
+ return $.post('set_volume/' + new_volume);
}
}, 200);
}
@@ -708,10 +708,10 @@ sub _cmus_parse_info {
@font-face{
font-family:'FontAwesome';
- src:url('/fontawesome-webfont.eot?v=3.0.1');
- src:url('/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
- url('/fontawesome-webfont.woff?v=3.0.1') format('woff'),
- url('/fontawesome-webfont.ttf?v=3.0.1') format('truetype');
+ src:url('fontawesome-webfont.eot?v=3.0.1');
+ src:url('fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
+ url('fontawesome-webfont.woff?v=3.0.1') format('woff'),
+ url('fontawesome-webfont.ttf?v=3.0.1') format('truetype');
font-weight:normal;
font-style:normal }
View
2  src/index.html
@@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.3, maximum-scale=2.0, user-scalable=yes"/>
<title>Mojolicious radio box</title>
- <script src="/mojo/jquery/jquery.js"></script>
+ <script src="mojo/jquery/jquery.js"></script>
<script>
// generated from coffee-script source
#<<< coffee -p src/radio-box-client.coffee
View
20 src/radio-box-client.coffee
@@ -32,7 +32,7 @@ window.App =
# ...........................................
update_info: ->
- $.get '/get_info', (info_data) ->
+ $.get 'get_info', (info_data) ->
App.info = info_data.info
App.volume = App.info.volume if App.info.volume?
App.render_info()
@@ -113,49 +113,49 @@ window.App =
do_pause: ->
$("#bt_pause").attr('disabled', 'disabled')
if App.info.duration > 0
- $.post '/pause', (info_data) ->
+ $.post 'pause', (info_data) ->
App.info = info_data.info
App.render_info()
else if App.info.status == 'playing'
- $.post '/stop', (info_data) ->
+ $.post 'stop', (info_data) ->
App.info = info_data.info
App.render_info()
else if App.info.status == 'stopped'
- $.post '/play', (info_data) ->
+ $.post 'play', (info_data) ->
App.info = info_data.info
App.render_info()
# ...........................................
do_next: ->
$("#bt_next").attr('disabled', 'disabled')
- $.post '/next', (info_data) ->
+ $.post 'next', (info_data) ->
App.info = info_data.info
App.render_info()
# ...........................................
do_prev: ->
$("#bt_prev").attr('disabled', 'disabled')
- $.post '/prev', (info_data) ->
+ $.post 'prev', (info_data) ->
App.info = info_data.info
App.render_info()
# ...........................................
do_get_radio: ->
- $.get '/get_radio', (result) ->
+ $.get 'get_radio', (result) ->
$("#radio_stations").show()
App.radio_stations = result.radio_stations;
App.render_select_radio()
# ...........................................
do_get_music: ->
- $.get '/get_music', (info_data) ->
+ $.get 'get_music', (info_data) ->
App.info = info_data.info
App.render_info()
# ...........................................
do_select_radio: (event) ->
if event.target.value
- $.post('/play_radio'
+ $.post('play_radio'
url: event.target.value
(info_data) ->
App.info = info_data.info
@@ -185,7 +185,7 @@ window.App =
if new_volume? && new_volume != App.volume
App.volume = new_volume
$("#volume_slider").val(new_volume)
- $.post '/set_volume/' + new_volume
+ $.post 'set_volume/' + new_volume
200
)
# .............................................................................
View
8 src/static/font-awesome.min.css
@@ -23,10 +23,10 @@
@font-face{
font-family:'FontAwesome';
- src:url('/fontawesome-webfont.eot?v=3.0.1');
- src:url('/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
- url('/fontawesome-webfont.woff?v=3.0.1') format('woff'),
- url('/fontawesome-webfont.ttf?v=3.0.1') format('truetype');
+ src:url('fontawesome-webfont.eot?v=3.0.1');
+ src:url('fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
+ url('fontawesome-webfont.woff?v=3.0.1') format('woff'),
+ url('fontawesome-webfont.ttf?v=3.0.1') format('truetype');
font-weight:normal;
font-style:normal }
Please sign in to comment.
Something went wrong with that request. Please try again.