(setting)
| 4155 | return "ejs-" + identifier + "-settings"; |
| 4156 | } |
| 4157 | preGetSetting(setting) { |
| 4158 | if (window.localStorage && !this.config.disableLocalStorage) { |
| 4159 | let coreSpecific = localStorage.getItem(this.getLocalStorageKey()); |
| 4160 | try { |
| 4161 | coreSpecific = JSON.parse(coreSpecific); |
| 4162 | if (coreSpecific && coreSpecific.settings) { |
| 4163 | return coreSpecific.settings[setting]; |
| 4164 | } |
| 4165 | } catch(e) { |
| 4166 | console.warn("Could not load previous settings", e); |
| 4167 | } |
| 4168 | } |
| 4169 | if (this.config.defaultOptions && this.config.defaultOptions[setting]) { |
| 4170 | return this.config.defaultOptions[setting]; |
| 4171 | } |
| 4172 | return null; |
| 4173 | } |
| 4174 | getCoreSettings() { |
| 4175 | if (!window.localStorage || this.config.disableLocalStorage) { |
| 4176 | if (this.config.defaultOptions) { |
no test coverage detected