Added config for extension, updated a lot of things to use config. Updated icons.

This commit is contained in:
Mario Basic
2015-06-13 19:27:35 +02:00
parent 1a2bac7cc3
commit 3331d187b6
11 changed files with 433 additions and 337 deletions

View File

@@ -12,6 +12,8 @@ var _jquery2 = _interopRequireDefault(_jquery);
global.jQuery = require('jquery');
require('bootstrap');
var config = require('./config');
function detectCheckedRadio(name) {
for (var i = 0; i < document.getElementsByName(name).length; i++) {
var button = document.getElementsByName(name)[i];
@@ -54,9 +56,9 @@ function save_options(e) {
function restore_options() {
// Use default value color = 'red' and likesColor = true.
chrome.storage.sync.get({
theme: 'light',
theme: config.theme,
blacklist: '',
loggingType: 'domain'
loggingType: config.loggingType
}, function (items) {
document.getElementById('theme').value = items.theme;
document.getElementById('blacklist').value = items.blacklist;
@@ -68,7 +70,40 @@ document.addEventListener('DOMContentLoaded', restore_options);
document.getElementById('save').addEventListener('click', save_options);
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"bootstrap":2,"jquery":15}],2:[function(require,module,exports){
},{"./config":2,"bootstrap":3,"jquery":16}],2:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = {
// Time for idle state of the browser
// The user is considered idle if there was
// no activity in the browser for x seconds
detectionIntervalInSeconds: 60,
//default logging type
loggingType: 'domain',
// By default logging is enabled
loggingEnabled: true,
// Url to which to send the heartbeat
heartbeatApiUrl: 'https://wakatime.com/api/v1/users/current/heartbeats',
// Url from which to detect if the user is logged in
currentUserApiUrl: 'https://wakatime.com/api/v1/users/current',
// The url to logout the user from wakatime
logoutUserUrl: 'https://wakatime.com/logout',
// Different colors for different states of the extension
colors: {
allGood: '',
notLogging: 'gray',
notSignedIn: 'red',
lightTheme: 'white'
},
// Default theme
theme: 'light'
};
module.exports = exports['default'];
},{}],3:[function(require,module,exports){
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
@@ -82,7 +117,7 @@ require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
},{"../../js/affix.js":3,"../../js/alert.js":4,"../../js/button.js":5,"../../js/carousel.js":6,"../../js/collapse.js":7,"../../js/dropdown.js":8,"../../js/modal.js":9,"../../js/popover.js":10,"../../js/scrollspy.js":11,"../../js/tab.js":12,"../../js/tooltip.js":13,"../../js/transition.js":14}],3:[function(require,module,exports){
},{"../../js/affix.js":4,"../../js/alert.js":5,"../../js/button.js":6,"../../js/carousel.js":7,"../../js/collapse.js":8,"../../js/dropdown.js":9,"../../js/modal.js":10,"../../js/popover.js":11,"../../js/scrollspy.js":12,"../../js/tab.js":13,"../../js/tooltip.js":14,"../../js/transition.js":15}],4:[function(require,module,exports){
/* ========================================================================
* Bootstrap: affix.js v3.3.4
* http://getbootstrap.com/javascript/#affix
@@ -246,7 +281,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],4:[function(require,module,exports){
},{}],5:[function(require,module,exports){
/* ========================================================================
* Bootstrap: alert.js v3.3.4
* http://getbootstrap.com/javascript/#alerts
@@ -342,7 +377,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],5:[function(require,module,exports){
},{}],6:[function(require,module,exports){
/* ========================================================================
* Bootstrap: button.js v3.3.4
* http://getbootstrap.com/javascript/#buttons
@@ -460,7 +495,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],6:[function(require,module,exports){
},{}],7:[function(require,module,exports){
/* ========================================================================
* Bootstrap: carousel.js v3.3.4
* http://getbootstrap.com/javascript/#carousel
@@ -699,7 +734,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],7:[function(require,module,exports){
},{}],8:[function(require,module,exports){
/* ========================================================================
* Bootstrap: collapse.js v3.3.4
* http://getbootstrap.com/javascript/#collapse
@@ -912,7 +947,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],8:[function(require,module,exports){
},{}],9:[function(require,module,exports){
/* ========================================================================
* Bootstrap: dropdown.js v3.3.4
* http://getbootstrap.com/javascript/#dropdowns
@@ -1075,7 +1110,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],9:[function(require,module,exports){
},{}],10:[function(require,module,exports){
/* ========================================================================
* Bootstrap: modal.js v3.3.4
* http://getbootstrap.com/javascript/#modals
@@ -1416,7 +1451,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],10:[function(require,module,exports){
},{}],11:[function(require,module,exports){
/* ========================================================================
* Bootstrap: popover.js v3.3.4
* http://getbootstrap.com/javascript/#popovers
@@ -1526,7 +1561,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],11:[function(require,module,exports){
},{}],12:[function(require,module,exports){
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.4
* http://getbootstrap.com/javascript/#scrollspy
@@ -1700,7 +1735,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],12:[function(require,module,exports){
},{}],13:[function(require,module,exports){
/* ========================================================================
* Bootstrap: tab.js v3.3.4
* http://getbootstrap.com/javascript/#tabs
@@ -1855,7 +1890,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],13:[function(require,module,exports){
},{}],14:[function(require,module,exports){
/* ========================================================================
* Bootstrap: tooltip.js v3.3.4
* http://getbootstrap.com/javascript/#tooltip
@@ -2333,7 +2368,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],14:[function(require,module,exports){
},{}],15:[function(require,module,exports){
/* ========================================================================
* Bootstrap: transition.js v3.3.4
* http://getbootstrap.com/javascript/#transitions
@@ -2394,7 +2429,7 @@ require('../../js/affix.js')
}(jQuery);
},{}],15:[function(require,module,exports){
},{}],16:[function(require,module,exports){
/*!
* jQuery JavaScript Library v2.1.4
* http://jquery.com/