mirror of https://github.com/dani/vroom.git
Define rootUrl in js_include
So /localize is working not matter which alias we use, even on the front page
This commit is contained in:
parent
1e2e524900
commit
4815e4cb83
|
@ -35,7 +35,7 @@ var locale = {
|
|||
|
||||
// Localize the strings we need
|
||||
$.ajax({
|
||||
url: '/localize',
|
||||
url: rootUrl + 'localize',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
|
|
|
@ -162,11 +162,6 @@
|
|||
</div>
|
||||
%= include 'js_include'
|
||||
<script>
|
||||
<%
|
||||
my $url = $self->url_for('/');
|
||||
$url .= ($url =~ m/\/$/) ? '' : '/';
|
||||
%>
|
||||
var rootUrl = '<%= $url %>';
|
||||
var roomName = '<%= $room %>';
|
||||
$( document ).ready(function() {
|
||||
webrtc = new SimpleWebRTC({
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
<script type="text/javascript">
|
||||
<%
|
||||
my $url = $self->url_for('/');
|
||||
$url .= ($url =~ m/\/$/) ? '' : '/';
|
||||
%>
|
||||
var rootUrl = '<%= $url %>';
|
||||
</script>
|
||||
<script type="text/javascript" src="/js/simplewebrtc.bundle.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
|
||||
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
|
||||
|
|
Loading…
Reference in New Issue