Skip to content

Commit

Permalink
Don't load data
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmaa committed Oct 29, 2024
1 parent a855687 commit f46ef7b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions ext/js/pages/settings/settings-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import {EventDispatcher} from '../../core/event-dispatcher.js';
import {EventListenerCollection} from '../../core/event-listener-collection.js';
import {fetchJson} from '../../core/fetch-utilities.js';
import {isObjectNotArray} from '../../core/object-utilities.js';
import {generateId} from '../../core/utilities.js';
import {OptionsUtil} from '../../data/options-util.js';
Expand Down Expand Up @@ -78,7 +77,7 @@ export class SettingsController extends EventDispatcher {
/** */
async prepare() {
await this._templates.loadFromFiles(['/templates-settings.html']);
this._recommendedSettingsByLanguage = await fetchJson('/data/recommended-settings.json');
// this._recommendedSettingsByLanguage = await fetchJson('/data/recommended-settings.json');
this._application.on('optionsUpdated', this._onOptionsUpdated.bind(this));
if (this._canObservePermissionsChanges()) {
chrome.permissions.onAdded.addListener(this._onPermissionsChanged.bind(this));
Expand Down Expand Up @@ -186,13 +185,13 @@ export class SettingsController extends EventDispatcher {
return await this.modifyProfileSettings([{action: 'set', path, value}]);
}

/**
* @param {string} language
* @returns {import('settings-controller').RecommendedSetting[]}
*/
getRecommendedSettings(language) {
return this._recommendedSettingsByLanguage[language];
}
// /**
// * @param {string} language
// * @returns {import('settings-controller').RecommendedSetting[]}
// */
// getRecommendedSettings(language) {
// return this._recommendedSettingsByLanguage[language];
// }

/**
* @returns {Promise<import('dictionary-importer').Summary[]>}
Expand Down

0 comments on commit f46ef7b

Please sign in to comment.