File tree Expand file tree Collapse file tree 4 files changed +36
-24
lines changed
Expand file tree Collapse file tree 4 files changed +36
-24
lines changed Original file line number Diff line number Diff line change 33// @description Adds the magic of AI to Amazon shopping
44// @author KudoAI
55// @namespace https://kudoai.com
6- // @version 2025.1.15
6+ // @version 2025.1.15.1
77// @license MIT
88// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
99// @icon 64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
19341934
19351935 bylineVisibility ( ) {
19361936 if ( env . browser . isPhone ) return // since byline hidden by app.styles
1937- const headerElems = {
1937+
1938+ // Init header elems
1939+ const headerElems = { byline : appDiv . querySelector ( '.kudoai' ) }
1940+ if ( ! headerElems . byline ) return // since in loading state
1941+ Object . assign ( headerElems , {
19381942 btns : appDiv . querySelectorAll ( '[id$=-header-btns] > btn' ) ,
1939- byline : appDiv . querySelector ( '.kudoai' ) ,
19401943 logo : appDiv . querySelector ( `#${ app . cssPrefix } -logo` )
1941- }
1942- const appDivStyle = getComputedStyle ( appDiv )
1943- const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
1944+ } )
19441945
19451946 // Calc/store widths of app/x-padding + header elems
1947+ const appDivStyle = getComputedStyle ( appDiv )
1948+ const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
19461949 const widths = {
19471950 appDiv : appDiv . getBoundingClientRect ( ) . width ,
19481951 appDivXpadding : parseFloat ( appDivStyle . paddingLeft ) + parseFloat ( appDivStyle . paddingRight )
Original file line number Diff line number Diff line change 148148// @description :zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149// @author KudoAI
150150// @namespace https://kudoai.com
151- // @version 2025.1.15
151+ // @version 2025.1.15.1
152152// @license MIT
153153// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
154154// @icon 64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
23652365
23662366 bylineVisibility ( ) {
23672367 if ( env . browser . isPhone ) return // since byline hidden by app.styles
2368- const headerElems = {
2368+
2369+ // Init header elems
2370+ const headerElems = { byline : appDiv . querySelector ( '.kudoai' ) }
2371+ if ( ! headerElems . byline ) return // since in loading state
2372+ Object . assign ( headerElems , {
23692373 btns : appDiv . querySelectorAll ( '[id$=-header-btns] > btn' ) ,
2370- byline : appDiv . querySelector ( '.kudoai' ) ,
23712374 logo : appDiv . querySelector ( `#${ app . cssPrefix } -logo` )
2372- }
2373- const appDivStyle = getComputedStyle ( appDiv )
2374- const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
2375+ } )
23752376
23762377 // Calc/store widths of app/x-padding + header elems
2378+ const appDivStyle = getComputedStyle ( appDiv )
2379+ const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
23772380 const widths = {
23782381 appDiv : appDiv . getBoundingClientRect ( ) . width ,
23792382 appDivXpadding : parseFloat ( appDivStyle . paddingLeft ) + parseFloat ( appDivStyle . paddingRight )
Original file line number Diff line number Diff line change 148148// @description :zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149// @author KudoAI
150150// @namespace https://kudoai.com
151- // @version 2025.1.15.1
151+ // @version 2025.1.15.2
152152// @license MIT
153153// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
154154// @icon 64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
23622362
23632363 bylineVisibility ( ) {
23642364 if ( env . browser . isPhone ) return // since byline hidden by app.styles
2365- const headerElems = {
2365+
2366+ // Init header elems
2367+ const headerElems = { byline : appDiv . querySelector ( '.kudoai' ) }
2368+ if ( ! headerElems . byline ) return // since in loading state
2369+ Object . assign ( headerElems , {
23662370 btns : appDiv . querySelectorAll ( '[id$=-header-btns] > btn' ) ,
2367- byline : appDiv . querySelector ( '.kudoai' ) ,
23682371 logo : appDiv . querySelector ( `#${ app . cssPrefix } -logo` )
2369- }
2370- const appDivStyle = getComputedStyle ( appDiv )
2371- const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
2372+ } )
23722373
23732374 // Calc/store widths of app/x-padding + header elems
2375+ const appDivStyle = getComputedStyle ( appDiv )
2376+ const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
23742377 const widths = {
23752378 appDiv : appDiv . getBoundingClientRect ( ) . width ,
23762379 appDivXpadding : parseFloat ( appDivStyle . paddingLeft ) + parseFloat ( appDivStyle . paddingRight )
Original file line number Diff line number Diff line change 149149// @description :zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150// @author KudoAI
151151// @namespace https://kudoai.com
152- // @version 2025.1.15
152+ // @version 2025.1.15.1
153153// @license MIT
154154// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
155155// @icon 64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
25652565
25662566 bylineVisibility ( ) {
25672567 if ( env . browser . isPhone ) return // since byline hidden by app.styles
2568- const headerElems = {
2568+
2569+ // Init header elems
2570+ const headerElems = { byline : appDiv . querySelector ( '.kudoai' ) }
2571+ if ( ! headerElems . byline ) return // since in loading state
2572+ Object . assign ( headerElems , {
25692573 appPrefix : appDiv . querySelector ( '#app-prefix' ) ,
25702574 btns : appDiv . querySelectorAll ( '[id$=-header-btns] > btn' ) ,
2571- byline : appDiv . querySelector ( '.kudoai' ) ,
25722575 logo : appDiv . querySelector ( `#${ app . cssPrefix } -logo` )
2573- }
2574- const appDivStyle = getComputedStyle ( appDiv )
2575- const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
2576+ } )
25762577
25772578 // Calc/store widths of app/x-padding + header elems
2579+ const appDivStyle = getComputedStyle ( appDiv )
2580+ const forceDisplayStyles = 'position: absolute; visibility: hidden; display: block;'
25782581 const widths = {
25792582 appDiv : appDiv . getBoundingClientRect ( ) . width ,
25802583 appDivXpadding : parseFloat ( appDivStyle . paddingLeft ) + parseFloat ( appDivStyle . paddingRight )
You can’t perform that action at this time.
0 commit comments