| 216 | } |
| 217 | } |
| 218 | setval(t, e) { |
| 219 | switch (this.getEnv()) { |
| 220 | case 'Surge': |
| 221 | case 'Loon': |
| 222 | case 'Stash': |
| 223 | case 'Shadowrocket': |
| 224 | return $persistentStore.write(t, e) |
| 225 | case 'Quantumult X': |
| 226 | return $prefs.setValueForKey(t, e) |
| 227 | case 'Node.js': |
| 228 | return (this.data = this.loaddata()), (this.data[e] = t), this.writedata(), !0 |
| 229 | default: |
| 230 | return (this.data && this.data[e]) || null |
| 231 | } |
| 232 | } |
| 233 | initGotEnv(t) { |
| 234 | ;(this.got = this.got ? this.got : require('got')), |
| 235 | (this.cktough = this.cktough ? this.cktough : require('tough-cookie')), |