diff --git a/sox.css b/sox.css index 51ac393..6bdafb7 100644 --- a/sox.css +++ b/sox.css @@ -135,8 +135,6 @@ float: right; } -.sox-feature-settings-save {} - /* -------- sox specific features' CSS ------- */ #sox-scrollToTop { diff --git a/sox.dialog.html b/sox.dialog.html index 164170d..e7fe5df 100644 --- a/sox.dialog.html +++ b/sox.dialog.html @@ -21,6 +21,6 @@

search

- + diff --git a/sox.dialog.js b/sox.dialog.js index 6dd5850..2ed5ec5 100644 --- a/sox.dialog.js +++ b/sox.dialog.js @@ -8,7 +8,7 @@ sox.debug('initializing SOX dialog'); - var version = options.version, + let version = options.version, features = options.features, settings = options.settings, lastVersionInstalled = options.lastVersionInstalled, @@ -41,7 +41,7 @@ ]; function addCategory(name) { - var $div = $('
', { + let $div = $('
', { 'class': 'header category', 'id': 'header-for-' + name }), @@ -61,7 +61,7 @@ } function addFeature(category, name, description, featureSettings, extendedDescription, metaLink) { - var $div = $('
', { + let $div = $('
', { 'class': 'sox-feature' }), $info = $('', { @@ -89,7 +89,7 @@ $soxSettingsDialogFeatures.find('#' + category).append($div); if (featureSettings) { - var $settingsDiv = $('
', { + let $settingsDiv = $('
', { id: 'feature-settings-' + name, 'class': 'sox-feature-settings', style: 'display: none; margin-top: 5px;' @@ -99,7 +99,7 @@ click: function(e) { e.preventDefault(); //don't uncheck the checkbox - var $settingsPanel = $('#feature-settings-' + name); + let $settingsPanel = $('#feature-settings-' + name); if ($settingsPanel.is(":visible")) { $settingsPanel.fadeOut(); @@ -108,12 +108,11 @@ } } - }); - - var optionalSettings = GM_getValue("SOX-" + name + "-settings", -1); + }), + optionalSettings = GM_getValue("SOX-" + name + "-settings", -1); - for (var i = 0; i < featureSettings.length; i++) { - var currentSetting = featureSettings[i]; + for (let i = 0; i < featureSettings.length; i++) { + let currentSetting = featureSettings[i]; $settingsDiv .append(currentSetting.desc) .append('
') @@ -126,13 +125,12 @@ .append('
'); } - var $saveFeatureSettings = $('', { + let $saveFeatureSettings = $('', { id: 'saveSettings-' + name, - 'class': 'sox-feature-settings-save', text: 'Save Settings', click: function(e) { e.preventDefault(); //don't uncheck the checkbox - var settingsToSave = {}; + let settingsToSave = {}; $(this).parent().find('.featureSetting').each(function() { settingsToSave[$(this).attr('id')] = ($(this).is(':checkbox') ? $(this).is(':checked') : $(this).val()); }); @@ -144,7 +142,7 @@ $settingsDiv.append($saveFeatureSettings); - var $feature = $soxSettingsDialogFeatures.find('input#' + name).parent(); + let $feature = $soxSettingsDialogFeatures.find('input#' + name).parent(); $feature.append($settingsToggle); if ($div.has('i.fa-info').length) { @@ -165,7 +163,7 @@ if (version !== lastVersionInstalled) { GM_setValue('SOX-lastVersionInstalled', version); - var $newVersionDetailsContainer = $('
', { + let $newVersionDetailsContainer = $('
', { 'class': 'sox-new-version-details' }), $newVersionHeader = $('
', { @@ -175,7 +173,7 @@ $changes = $('