File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 148
148
// @description :zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149
149
// @author KudoAI
150
150
// @namespace https://kudoai.com
151
- // @version 2025.5.26.4
151
+ // @version 2025.5.26.5
152
152
// @license MIT
153
153
// @icon https://assets.ddgpt.com/images/icons/app/icon48.png?v=533ce0f
154
154
// @icon 64 https://assets.ddgpt.com/images/icons/app/icon64.png?v=533ce0f
338
338
window . config = { }
339
339
window . settings = {
340
340
load ( ...keys ) {
341
- keys . flat ( ) . forEach ( key => {
342
- config [ key ] = GM_getValue ( `${ app . configKeyPrefix } _${ key } ` ,
343
- this . controls ?. [ key ] ?. defaultVal ?? this . controls ?. [ key ] ?. type == 'toggle' )
344
- } )
341
+ keys . flat ( ) . forEach ( key => config [ key ] = GM_getValue ( `${ app . configKeyPrefix } _${ key } ` , initDefaultVal ( key ) ) )
342
+ function initDefaultVal ( key ) {
343
+ return this . controls ?. [ key ] ?. defaultVal
344
+ ?? this . controls ?. [ key ] ?. type == 'slider' ? 100
345
+ : this . controls ?. [ key ] ?. type == 'toggle'
346
+ }
345
347
} ,
346
348
save ( key , val ) { GM_setValue ( `${ app . configKeyPrefix } _${ key } ` , val ) ; config [ key ] = val }
347
349
}
You can’t perform that action at this time.
0 commit comments