Skip to content

Commit

Permalink
Revert "add a hard-refresh option"
Browse files Browse the repository at this point in the history
This reverts commit 7ad91a7.
  • Loading branch information
mgeraci committed Mar 9, 2017
1 parent 7a2d38a commit 4334e73
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 27 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ project root. You'll also need to obtain a free api key for
# swap the css, js, or templates
VERSION = "0.000"

# how often the entire page should hard refresh (0 for no refreshing)
REFRESH_TIME = 10000

# your info for forecast.io
FORECASTIO_API_KEY = "<your api key>"
FORECASTIO_LAT_LONG = "40.676423,-73.980488"
Expand Down
2 changes: 0 additions & 2 deletions auto-hud.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

# secret settings
from localsettings import VERSION
from localsettings import REFRESH_TIME
from localsettings import BIRTHDAYS
from localsettings import CHORES
from localsettings import FORECASTIO_API_KEY
Expand All @@ -24,7 +23,6 @@ def index_route(params={}):

return render_template('index.html', params = {
'version': VERSION,
'refreshTime': REFRESH_TIME,
'C': C,
'forecastioApiKey': FORECASTIO_API_KEY,
'forecastioLatLong': FORECASTIO_LAT_LONG,
Expand Down
12 changes: 0 additions & 12 deletions static/js/AutoHUD.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ window.AutoHUD = {
@controller.init()

@watchVersion(params)
@watchRefershTime(params.refreshTime)


# versioning
Expand Down Expand Up @@ -57,15 +56,4 @@ window.AutoHUD = {
# if the version has updated, refresh the page
if data.version != @version
window.location.reload()


# hard refresher
#############################################################################

watchRefershTime: (time) ->
return if !time

setTimeout(->
window.location.reload()
, time)
}
11 changes: 1 addition & 10 deletions static/js/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ window.AutoHUD = {
this.model.set(params);
this.view.init();
this.controller.init();
this.watchVersion(params);
return this.watchRefershTime(params.refreshTime);
return this.watchVersion(params);
},
watchVersion: function(params) {
if (params.version == null) {
Expand Down Expand Up @@ -56,14 +55,6 @@ window.AutoHUD = {
if (data.version !== this.version) {
return window.location.reload();
}
},
watchRefershTime: function(time) {
if (!time) {
return;
}
return setTimeout(function() {
return window.location.reload();
}, time);
}
};

Expand Down

0 comments on commit 4334e73

Please sign in to comment.