| 277 | } |
| 278 | } |
| 279 | setval(t, s) { |
| 280 | if (this.isSurge() || this.isLoon()) { |
| 281 | return $persistentStore.write(t, s); |
| 282 | } else if (this.isQuanX()) { |
| 283 | return $prefs.setValueForKey(t, s); |
| 284 | } else if (this.isNode()) { |
| 285 | this.data = this.loaddata(); |
| 286 | this.data[s] = t; |
| 287 | this.writedata(); |
| 288 | return true; |
| 289 | } else { |
| 290 | return this.data && this.data[s] || null; |
| 291 | } |
| 292 | } |
| 293 | initGotEnv(t) { |
| 294 | this.got = this.got ? this.got : require("got"); |
| 295 | this.cktough = this.cktough ? this.cktough : require("tough-cookie"); |