diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
diff --git a/_locales/az_AZ/messages.json b/_locales/az_AZ/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/de_DE/messages.json b/_locales/de_DE/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/en_US/messages.json b/_locales/en_US/messages.json
old mode 100644
new mode 100755
index 01bc01c..ea22f50
--- a/_locales/en_US/messages.json
+++ b/_locales/en_US/messages.json
@@ -1,6 +1,6 @@
{
"badgeTooltip": {
- "message": "1 bitcoin is worth $1 today",
+ "message": "1 bitcoin is worth $1",
"description": "Text that shows up when the mouse is hovering over the add-on's button in the browser's toolbar."
},
"extensionDescription": {
diff --git a/_locales/es_ES/messages.json b/_locales/es_ES/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/fa_IR/messages.json b/_locales/fa_IR/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/fr_FR/messages.json b/_locales/fr_FR/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/id_ID/messages.json b/_locales/id_ID/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/it_IT/messages.json b/_locales/it_IT/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/kk_KZ/messages.json b/_locales/kk_KZ/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/nl_NL/messages.json b/_locales/nl_NL/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/pt_BR/messages.json b/_locales/pt_BR/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/ru_RU/messages.json b/_locales/ru_RU/messages.json
old mode 100644
new mode 100755
diff --git a/_locales/uk_UA/messages.json b/_locales/uk_UA/messages.json
old mode 100644
new mode 100755
diff --git a/crowdin.yml b/crowdin.yml
old mode 100644
new mode 100755
diff --git a/icons/icon-128.png b/icons/icon-128.png
old mode 100644
new mode 100755
diff --git a/icons/icon-16.png b/icons/icon-16.png
old mode 100644
new mode 100755
diff --git a/icons/icon-32.png b/icons/icon-32.png
old mode 100644
new mode 100755
diff --git a/icons/icon-48.png b/icons/icon-48.png
old mode 100644
new mode 100755
diff --git a/icons/icon-64.png b/icons/icon-64.png
old mode 100644
new mode 100755
diff --git a/icons/icon.svg b/icons/icon.svg
old mode 100644
new mode 100755
diff --git a/manifest.json b/manifest.json
old mode 100644
new mode 100755
index 890b20a..a998490
--- a/manifest.json
+++ b/manifest.json
@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Yet Another Bitcoin Price Ticker",
"short_name": "YABPT",
- "version": "1.5.3",
+ "version": "1.5.5",
"description": "__MSG_extensionDescription__",
"icons": {
"16": "icons/icon-16.png",
diff --git a/options/css/countrySelect.min.css b/options/css/countrySelect.min.css
old mode 100644
new mode 100755
diff --git a/options/css/options.css b/options/css/options.css
old mode 100644
new mode 100755
diff --git a/options/images/flags.png b/options/images/flags.png
old mode 100644
new mode 100755
diff --git a/options/js/countrySelect.js b/options/js/countrySelect.js
old mode 100644
new mode 100755
diff --git a/options/js/jquery-3.3.1.slim.min.js b/options/js/jquery-3.3.1.slim.min.js
old mode 100644
new mode 100755
diff --git a/options/js/options.js b/options/js/options.js
old mode 100644
new mode 100755
index 38aa389..2122bb9
--- a/options/js/options.js
+++ b/options/js/options.js
@@ -8,15 +8,23 @@
var currencies = $.fn.countrySelect.getCountryData();
function saveOptions() {
- setOption('currency', $('#currency').countrySelect('getSelectedCountryData').currency);
- }
+ var option = {
+ currency: $('#currency').countrySelect('getSelectedCountryData').currency,
+ frequency: document.getElementById('frequency').value,
+ upperLimit: document.getElementById('upperLimit').value,
+ lowerLimit: document.getElementById('lowerLimit').value
+ }
+
+ setOption(option);
- function setOption(option, value) {
- var yabpt = {};
- yabpt[option] = value;
+ }
+ function setOption(option) {
chrome.storage.local.set({
- yabpt: yabpt
+ currency: option['currency'],
+ frequency: option['frequency'],
+ upperLimit: option['upperLimit'],
+ lowerLimit: option['lowerLimit']
});
}
@@ -32,20 +40,29 @@
desc.text(chrome.i18n.getMessage('option_' + pref + '_summary'));
});
- chrome.storage.local.get('yabpt', function (res) {
+ chrome.storage.local.get('currency', function (res) {
var selectedCountry = 'us';
for (var i = 0; i < currencies.length; i++) {
var item = currencies[i];
- if (res.yabpt.currency == item.currency) {
+ if (res.currency == item.currency) {
selectedCountry = item.iso2;
}
}
$('#currency').countrySelect('selectCountry', selectedCountry);
});
+ chrome.storage.local.get(function (res) {
+ document.getElementById('frequency').value = res.frequency;
+ document.getElementById('upperLimit').value = res.upperLimit;
+ document.getElementById('lowerLimit').value = res.lowerLimit;
+ });
+
}
document.addEventListener('DOMContentLoaded', restoreOptions);
$('#currency').change(function () {
saveOptions();
});
+ $('input').change(function () {
+ saveOptions();
+ });
})();
diff --git a/options/options.html b/options/options.html
old mode 100644
new mode 100755
index 37f228c..f17b63c
--- a/options/options.html
+++ b/options/options.html
@@ -18,6 +18,15 @@