@@ -7,8 +7,8 @@ import { migration, versionLt } from './migration';
77
88/** 处理版本更新相关 */
99export const handleVersionUpdate = async ( ) => {
10- const version = await GM . getValue < string > ( 'Version' ) ;
11- if ( ! version ) return GM . setValue ( 'Version' , GM . info . script . version ) ;
10+ const version = await GM . getValue < string > ( '@ Version' ) ;
11+ if ( ! version ) return GM . setValue ( '@ Version' , GM . info . script . version ) ;
1212 if ( version === GM . info . script . version ) return ;
1313
1414 await migration ( version ) ; // 每次版本更新都执行一遍迁移
@@ -39,19 +39,19 @@ export const handleVersionUpdate = async () => {
3939 type : 'custom' ,
4040 duration : Number . POSITIVE_INFINITY ,
4141 // 手动点击关掉通知后才不会再次弹出
42- onDismiss : ( ) => GM . setValue ( 'Version' , GM . info . script . version ) ,
42+ onDismiss : ( ) => GM . setValue ( '@ Version' , GM . info . script . version ) ,
4343 } ,
4444 ) ;
4545
4646 // 监听储存的版本数据的变动,如果和当前版本一致就关掉弹窗
4747 // 防止在更新版本后一次性打开多个页面,不得不一个一个关过去
4848 const listenerId = await GM . addValueChangeListener (
49- 'Version' ,
49+ '@ Version' ,
5050 async ( _ , __ , newVersion ) => {
5151 if ( newVersion !== GM . info . script . version ) return ;
5252 toast . dismiss ( 'Version Tip' ) ;
5353 await GM . removeValueChangeListener ( listenerId ) ;
5454 } ,
5555 ) ;
56- } else await GM . setValue ( 'Version' , GM . info . script . version ) ;
56+ } else await GM . setValue ( '@ Version' , GM . info . script . version ) ;
5757} ;
0 commit comments