|
1 | 1 | /* eslint-disable camelcase */ |
2 | 2 | /* eslint-disable max-classes-per-file */ |
| 3 | +import { ExtVersion } from "@App/app/const"; |
3 | 4 | import LoggerCore from "@App/app/logger/core"; |
4 | 5 | import { Channel, ChannelHandler } from "@App/app/message/channel"; |
5 | 6 | import MessageContent from "@App/app/message/content"; |
@@ -134,16 +135,18 @@ export default class GMApi { |
134 | 135 | icon: (script.metadata.icon && script.metadata.icon[0]) || null, |
135 | 136 | icon64: (script.metadata.icon64 && script.metadata.icon64[0]) || null, |
136 | 137 | header: metadataStr, |
| 138 | + grant: script.metadata.grant || [], |
137 | 139 | }; |
| 140 | + |
138 | 141 | return { |
139 | 142 | // downloadMode |
140 | 143 | // isIncognito |
141 | | - scriptWillUpdate: false, |
| 144 | + scriptWillUpdate: true, |
142 | 145 | scriptHandler: "ScriptCat", |
143 | | - scriptUpdateURL: script.checkUpdateUrl, |
| 146 | + scriptUpdateURL: script.downloadUrl, |
144 | 147 | scriptMetaStr: metadataStr, |
145 | | - scriptSource: script.sourceCode, |
146 | | - version: script.metadata.version && script.metadata.version[0], |
| 148 | + // scriptSource: script.sourceCode, |
| 149 | + version: ExtVersion, |
147 | 150 | script: { |
148 | 151 | // TODO: 更多完整的信息(为了兼容Tampermonkey,后续待定) |
149 | 152 | name: script.name, |
|
0 commit comments