|
220 | 220 | // @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
|
221 | 221 | // @author Adam Lui
|
222 | 222 | // @namespace https://github.com/adamlui
|
223 |
| -// @version 2025.5.13.3 |
| 223 | +// @version 2025.5.13.4 |
224 | 224 | // @license MIT
|
225 | 225 | // @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
|
226 | 226 | // @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
|
|
796 | 796 | // Init toggle elems
|
797 | 797 | this.div = dom.create.elem('div', { class: this.class })
|
798 | 798 | this.navicon = dom.create.elem('img')
|
799 |
| - this.toggleLabel = dom.create.elem('label') |
800 | 799 | this.toggleInput = dom.create.elem('input')
|
| 800 | + this.toggleLabel = dom.create.elem('label') |
801 | 801 | this.switchSpan = dom.create.elem('span')
|
802 | 802 | this.knobSpan = dom.create.elem('span')
|
803 | 803 |
|
804 | 804 | // Assemble elems into parent div
|
805 | 805 | this.switchSpan.append(this.knobSpan)
|
806 |
| - this.div.append(this.navicon, this.toggleInput, this.switchSpan, this.toggleLabel) |
| 806 | + this.div.append(this.navicon, this.toggleInput, this.toggleLabel, this.switchSpan) |
807 | 807 |
|
808 | 808 | // Stylize elems
|
809 | 809 | this.stylize() // create/append stylesheet
|
|
851 | 851 | position: relative ; width: 30px ; height: 15px ; border-radius: 28px ;
|
852 | 852 | background-color: var(--switch-disabled-bg-color) ;
|
853 | 853 | bottom: ${ firstLink ? '0.5px' : '-0.15em' } ;
|
854 |
| - left: ${ env.browser.isMobile || firstLink ? 169 : 160 }px ; |
855 | 854 | transition: 0.4s ; -webkit-transition: 0.4s ; -moz-transition: 0.4s ;
|
856 | 855 | -o-transition: 0.4s ; -ms-transition: 0.4s }
|
857 | 856 | .${this.class} > span.enabled { /* switch on */
|
|
869 | 868 | background-color: var(--switch-disabled-bg-color) ; box-shadow: none }
|
870 | 869 | .${this.class} > span > span { /* knob span */
|
871 | 870 | position: absolute ; width: 12px ; height: 12px ; content: "" ; border-radius: 28px ;
|
872 |
| - background-color: white ; left: 3px ; bottom: 1.25px ; |
| 871 | + background-color: white ; left: -3px ; bottom: 1.25px ; |
873 | 872 | box-shadow: var(--knob-box-shadow) ;
|
874 | 873 | -webkit-box-shadow: var(--knob-box-shadow) ; -moz-box-shadow: var(--knob-box-shadow) ;
|
875 | 874 | transition: 0.4s ; -webkit-transition: 0.4s ; -moz-transition: 0.4s ;
|
876 | 875 | -o-transition: 0.4s ; -ms-transition: 0.4s }
|
877 | 876 | .${this.class} > label { /* toggle label */
|
878 | 877 | cursor: pointer ; overflow: hidden ; text-overflow: ellipsis ; white-space: nowrap ;
|
879 |
| - color: black ; width: 153px ; margin-left: -22px ; |
| 878 | + color: black ; padding: 0 12px ; flex-grow: 1 ; |
880 | 879 | ${ firstLink ? 'font-size: var(--text-sm)' : 'font-size: 0.875rem ; font-weight: 600' }}`
|
881 | 880 |
|
882 | 881 | // Dark scheme mods
|
|
0 commit comments