Skip to content

Commit

Permalink
Fixing javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrlaltdylan committed Dec 14, 2016
1 parent 6f82535 commit 80d2c67
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/Http/routes.php
Expand Up @@ -16,8 +16,8 @@

return view('mirror', [
'greetings' => config('mirror.greetings'),
'city' => env('city'),
'state' => env('state'),
'city' => env('CITY'),
'state' => env('STATE'),
'woeid' => env('WOEID'),
]);
});
Expand Down
Binary file added public/.DS_Store
Binary file not shown.
Binary file added public/js/.DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions public/js/vendor/jquery.simpleWeather.min.js 100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions public/js/weather.js
Expand Up @@ -3,7 +3,7 @@
$.simpleWeather({
location: '',
'woeid': woeid,
unit: 'c',
unit: 'f',
success: function(weather) {
var skycons = new Skycons({"color": "white"});

Expand Down Expand Up @@ -183,5 +183,5 @@
};
$(document).ready(function() {
updateWeather();
setInterval(updateWeather, 300000);
setInterval(updateWeather, 30000);
});
14 changes: 7 additions & 7 deletions resources/views/mirror.blade.php
Expand Up @@ -36,27 +36,27 @@
</p>
<script type="text/javascript">
var greetings = {!! json_encode($greetings) !!};
var city = {!! $city !!};
var state = {!! $state !!}
var city = "{!! $city !!}";
var state = "{!! $state !!}"
var woeid = {!! $woeid !!};
</script>
<script type="text/javascript" src="/js/clock.js"></script>
<script type="text/javascript" src="/js/weather.js"></script>
<script type="text/javascript">
function updateCompliment() {
var greeting = greetings[Math.floor(Math.random()*items.length)];
var greeting = greetings[Math.floor(Math.random()*greetings.length)];
$('#greeting').text(greeting);
}
setTimeout(function() {
updateCompliment();
}, 3000);
}, 30000);
</script>
<script type="text/javascript">
var gitHash = {{ trim(`git rev-parse HEAD`) }};
<!-- <script type="text/javascript">
var gitHash = "{{ trim(`git rev-parse HEAD`) }}";
(function checkVersion()
{
$.getJSON('/version', {}, function(json, textStatus) {
Expand All @@ -71,6 +71,6 @@ function updateCompliment() {
checkVersion();
}, 3000);
})();
</script>
</script> -->
</body>
</html>

0 comments on commit 80d2c67

Please sign in to comment.