(key)
| 294 | } |
| 295 | |
| 296 | getval(key) { |
| 297 | switch (this.getEnv()) { |
| 298 | case 'Surge': |
| 299 | case 'Loon': |
| 300 | case 'Stash': |
| 301 | case 'Shadowrocket': |
| 302 | case 'Egern': |
| 303 | return $persistentStore.read(key) |
| 304 | case 'Quantumult X': |
| 305 | return $prefs.valueForKey(key) |
| 306 | case 'Node.js': |
| 307 | this.data = this.loaddata() |
| 308 | return this.data[key] |
| 309 | default: |
| 310 | return (this.data && this.data[key]) || null |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | setval(val, key) { |
| 315 | switch (this.getEnv()) { |