Call javascript functions via public methods

This fixes cookie reset button, which wasn't working due to name conflicts (reset function in summary.js was called instead)
This commit is contained in:
Łukasz Mierzwa
2017-03-27 10:39:20 -07:00
parent 0bc1547bd5
commit 2c4770ea5d
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ var Colors = (function() {
}
isStaticLabel = function(key) {
return ($.inArray(key, getStaticLabels()) >= 0);
return ($.inArray(key, Colors.GetStaticLabels()) >= 0);
}
init = function(staticColors) {
+1 -1
View File
@@ -107,7 +107,7 @@ var Config = (function() {
// reset settings button action
$(params.ResetSelector).on('click', function(elem) {
reset();
Config.Reset();
location.reload();
});
+1 -1
View File
@@ -66,7 +66,7 @@ var Counter = (function(params) {
bgColor: '#333',
textColor: '#ff0'
});
setUnknown();
Counter.Unknown();
}
+3 -3
View File
@@ -22,13 +22,13 @@ var Progress = (function() {
complete = function() {
resetTimer();
Progress.ResetTimer();
NProgress.done();
}
pause = function() {
resetTimer();
Progress.ResetTimer();
NProgress.set(0.0);
}
@@ -37,7 +37,7 @@ var Progress = (function() {
var step_ms = 250; // animation step in ms
var steps = (Unsee.GetRefreshRate() * 1000) / step_ms; // how many steps we have
NProgress.set(0.0);
resetTimer();
Progress.ResetTimer();
timer = setInterval(function() {
NProgress.inc(1.0 / steps);
}, step_ms);
+4 -4
View File
File diff suppressed because one or more lines are too long