File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
chatgpt/autoclear-chatgpt-history Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 225
225
// @description :zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
226
226
// @author Adam Lui
227
227
// @namespace https://github.com/adamlui
228
- // @version 2025.1.30
228
+ // @version 2025.1.30.1
229
229
// @license MIT
230
230
// @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
231
231
// @icon 64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
876
876
} ,
877
877
878
878
update : {
879
- navicon ( ) {
880
- toggles . sidebar . navicon . src = `${ app . urls . assetHost } /images/icons/incognito/${
881
- env . ui . scheme == 'dark' ? 'white' : 'black' } /icon32.png?v=${ app . latestResourceCommitHash } `
879
+
880
+ navicon ( { preload = false } = { } ) {
881
+ const baseURL = `${ app . urls . assetHost } /images/icons/incognito` ,
882
+ schemeMap = { light : 'black' , dark : 'white' } ,
883
+ fileName = 'icon32.png'
884
+
885
+ if ( preload )
886
+ Object . keys ( schemeMap ) . forEach ( scheme =>
887
+ new Image ( ) . src = `${ baseURL } /${ schemeMap [ scheme ] } /${ fileName } ?v=`
888
+ + app . latestResourceCommitHash
889
+ )
890
+ else toggles . sidebar . navicon . src = baseURL
891
+ + `/${ schemeMap [ env . ui . scheme ] } /${ fileName } ?v=${ app . latestResourceCommitHash } `
882
892
} ,
883
893
884
894
scheme ( ) { // to match UI scheme
900
910
toggles . sidebar . toggleInput . checked ? 13 : 0 } px)`
901
911
} , 1 ) // min delay to trigger 1st transition fx
902
912
}
903
-
904
913
}
905
914
}
906
915
}
931
940
// Run MAIN routine
932
941
933
942
menu . register ( ) // create browser toolbar menu
943
+ toggles . sidebar . update . navicon ( { preload : true } ) // preload sidebar NAVICON variants
934
944
935
945
// Init UI props
936
946
await Promise . race ( [ chatgpt . isLoaded ( ) , new Promise ( resolve => setTimeout ( resolve , 5000 ) ) ] ) // initial UI loaded
You can’t perform that action at this time.
0 commit comments