| 339 | } |
| 340 | } |
| 341 | setval(t, s) { |
| 342 | if (this.isSurge() || this.isLoon()) { |
| 343 | return $persistentStore.write(t, s); |
| 344 | } else if (this.isQuanX()) { |
| 345 | return $prefs.setValueForKey(t, s); |
| 346 | } else if (this.isNode()) { |
| 347 | this.data = this.loaddata(); |
| 348 | this.data[s] = t; |
| 349 | this.writedata(); |
| 350 | return true; |
| 351 | } else { |
| 352 | return this.data && this.data[s] || null; |
| 353 | } |
| 354 | } |
| 355 | initGotEnv(t) { |
| 356 | this.got = this.got ? this.got : require("got"); |
| 357 | this.cktough = this.cktough ? this.cktough : require("tough-cookie"); |