|
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.5.13.3 |
| 228 | +// @version 2025.5.14 |
229 | 229 | // @license MIT
|
230 | 230 | // @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
|
231 | 231 | // @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
|
|
798 | 798 | // Init toggle elems
|
799 | 799 | this.div = dom.create.elem('div', { class: this.class })
|
800 | 800 | this.navicon = dom.create.elem('img')
|
801 |
| - this.toggleLabel = dom.create.elem('label') |
802 | 801 | this.toggleInput = dom.create.elem('input')
|
| 802 | + this.toggleLabel = dom.create.elem('label') |
803 | 803 | this.switchSpan = dom.create.elem('span')
|
804 | 804 | this.knobSpan = dom.create.elem('span')
|
805 | 805 |
|
806 | 806 | // Assemble elems into parent div
|
807 | 807 | this.switchSpan.append(this.knobSpan)
|
808 |
| - this.div.append(this.navicon, this.toggleInput, this.switchSpan, this.toggleLabel) |
| 808 | + this.div.append(this.navicon, this.toggleInput, this.toggleLabel, this.switchSpan) |
809 | 809 |
|
810 | 810 | // Stylize elems
|
811 | 811 | this.stylize() // create/append stylesheet
|
|
860 | 860 | position: relative ; width: 30px ; height: 15px ; border-radius: 28px ;
|
861 | 861 | background-color: var(--switch-disabled-bg-color) ;
|
862 | 862 | bottom: ${ firstLink ? '0.5px' : '-0.15em' } ;
|
863 |
| - left: ${ env.browser.isMobile || firstLink ? 169 : 160 }px ; |
864 | 863 | transition: 0.4s ; -webkit-transition: 0.4s ; -moz-transition: 0.4s ;
|
865 | 864 | -o-transition: 0.4s ; -ms-transition: 0.4s }
|
866 | 865 | .${this.class} > span.enabled { /* switch on */
|
|
878 | 877 | background-color: var(--switch-disabled-bg-color) ; box-shadow: none }
|
879 | 878 | .${this.class} > span > span { /* knob span */
|
880 | 879 | position: absolute ; width: 12px ; height: 12px ; content: "" ; border-radius: 28px ;
|
881 |
| - background-color: white ; left: 3px ; bottom: 1.25px ; |
| 880 | + background-color: white ; left: -3px ; bottom: 1.25px ; |
882 | 881 | box-shadow: var(--knob-box-shadow) ;
|
883 | 882 | -webkit-box-shadow: var(--knob-box-shadow) ; -moz-box-shadow: var(--knob-box-shadow) ;
|
884 | 883 | transition: 0.4s ; -webkit-transition: 0.4s ; -moz-transition: 0.4s ;
|
885 | 884 | -o-transition: 0.4s ; -ms-transition: 0.4s }
|
886 | 885 | .${this.class} > label { /* toggle label */
|
887 | 886 | cursor: pointer ; overflow: hidden ; text-overflow: ellipsis ; white-space: nowrap ;
|
888 |
| - color: black ; width: 153px ; margin-left: -22px ; |
| 887 | + color: black ; padding: 0 12px ; flex-grow: 1 ; |
889 | 888 | ${ firstLink ? 'font-size: var(--text-sm)' : 'font-size: 0.875rem ; font-weight: 600' }}`
|
890 | 889 |
|
891 | 890 | // Dark scheme mods
|
|
0 commit comments