Skip to content

Commit d016983

Browse files
committed
Moved caret styles to sheet
1 parent 688e421 commit d016983

File tree

12 files changed

+31
-30
lines changed

12 files changed

+31
-30
lines changed

chatgpt-auto-continue/chromium/extension/popup/controller.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
entry.leftElem.innerText = entryData.symbol || '⚙️'
3333
if (entryData.status) entry.label.textContent += ` — ${entryData.status}`
3434
}
35-
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', {
36-
size: 11, class: 'caret', style: 'position: absolute ; right: 14px ; transform: rotate(-90deg)' }))
35+
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', { size: 11, class: 'caret' }))
3736
entry.div.onclick = () => {
3837
if (entryData.type == 'category') toggleCategorySettingsVisiblity(entryData.key)
3938
else if (entryData.type == 'toggle') {
@@ -88,8 +87,8 @@
8887
if (action != 'hide' && dom.get.computedHeight(catChildrenDiv) == 0) { // show category settings
8988
Object.assign(catChildrenDiv.style, { height: `${dom.get.computedHeight(catChild)}px`,
9089
transition: transitions && !env.browser.isFF ? 'height 0.25s' : '' })
91-
Object.assign(caret.style, { transform: '',
92-
transition: transitions ? 'transform 0.15s ease-out' : '' })
90+
Object.assign(caret.style, { // point it down
91+
transform: 'rotate(0deg)', transition: transitions ? 'transform 0.15s ease-out' : '' })
9392
catChild.forEach(row => { // reset styles to support continuous transition on rapid show/hide
9493
row.style.transition = 'none' ; row.style.opacity = 0 })
9594
catChildrenDiv.offsetHeight // force reflow to insta-apply reset
@@ -101,7 +100,7 @@
101100
toggleCategorySettingsVisiblity(otherCategoryDiv.id, { action: 'hide' }))
102101
} else { // hide category settings
103102
Object.assign(catChildrenDiv.style, { height: 0, transition: '' })
104-
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' })
103+
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' }) // point it right
105104
}
106105
}
107106

chatgpt-auto-continue/chromium/extension/popup/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ body {
5050
}
5151
.menu-icon { padding: 8px }
5252
.menu-entry > label > .track { transform: scale(0.95) ; top: 1px } /* make child toggles smaller */
53+
.caret { position: absolute ; right: 14px ; transform: rotate(-90deg) }
5354
.categorized-entries { /* add left-stripe */
5455
border-left: 4px solid transparent ; height: 0 ; overflow: hidden ;
5556
border-image: linear-gradient(transparent, rgb(161 161 161)) 30 100%

chatgpt-auto-continue/firefox/extension/popup/controller.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
entry.leftElem.innerText = entryData.symbol || '⚙️'
3333
if (entryData.status) entry.label.textContent += ` — ${entryData.status}`
3434
}
35-
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', {
36-
size: 11, class: 'caret', style: 'position: absolute ; right: 14px ; transform: rotate(-90deg)' }))
35+
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', { size: 11, class: 'caret' }))
3736
entry.div.onclick = () => {
3837
if (entryData.type == 'category') toggleCategorySettingsVisiblity(entryData.key)
3938
else if (entryData.type == 'toggle') {
@@ -88,8 +87,8 @@
8887
if (action != 'hide' && dom.get.computedHeight(catChildrenDiv) == 0) { // show category settings
8988
Object.assign(catChildrenDiv.style, { height: `${dom.get.computedHeight(catChild)}px`,
9089
transition: transitions && !env.browser.isFF ? 'height 0.25s' : '' })
91-
Object.assign(caret.style, { transform: '',
92-
transition: transitions ? 'transform 0.15s ease-out' : '' })
90+
Object.assign(caret.style, { // point it down
91+
transform: 'rotate(0deg)', transition: transitions ? 'transform 0.15s ease-out' : '' })
9392
catChild.forEach(row => { // reset styles to support continuous transition on rapid show/hide
9493
row.style.transition = 'none' ; row.style.opacity = 0 })
9594
catChildrenDiv.offsetHeight // force reflow to insta-apply reset
@@ -101,7 +100,7 @@
101100
toggleCategorySettingsVisiblity(otherCategoryDiv.id, { action: 'hide' }))
102101
} else { // hide category settings
103102
Object.assign(catChildrenDiv.style, { height: 0, transition: '' })
104-
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' })
103+
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' }) // point it right
105104
}
106105
}
107106

chatgpt-auto-continue/firefox/extension/popup/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ body {
5050
}
5151
.menu-icon { padding: 8px }
5252
.menu-entry > label > .track { transform: scale(0.95) ; top: 1px } /* make child toggles smaller */
53+
.caret { position: absolute ; right: 14px ; transform: rotate(-90deg) }
5354
.categorized-entries { /* add left-stripe */
5455
border-left: 4px solid transparent ; height: 0 ; overflow: hidden ;
5556
border-image: linear-gradient(transparent, rgb(161 161 161)) 30 100%

chatgpt-infinity/chromium/extension/popup/controller.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
entry.leftElem.innerText = entryData.symbol || '⚙️'
3333
if (entryData.status) entry.label.textContent += ` — ${entryData.status}`
3434
}
35-
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', {
36-
size: 11, class: 'caret', style: 'position: absolute ; right: 14px ; transform: rotate(-90deg)' }))
35+
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', { size: 11, class: 'caret' }))
3736
entry.div.onclick = () => {
3837
if (entryData.type == 'category') toggleCategorySettingsVisiblity(entryData.key)
3938
else if (entryData.type == 'toggle') {
@@ -139,8 +138,8 @@
139138
if (action != 'hide' && dom.get.computedHeight(catChildrenDiv) == 0) { // show category settings
140139
Object.assign(catChildrenDiv.style, { height: `${dom.get.computedHeight(catChild)}px`,
141140
transition: transitions && !env.browser.isFF ? 'height 0.25s' : '' })
142-
Object.assign(caret.style, { transform: '',
143-
transition: transitions ? 'transform 0.15s ease-out' : '' })
141+
Object.assign(caret.style, { // point it down
142+
transform: 'rotate(0deg)', transition: transitions ? 'transform 0.15s ease-out' : '' })
144143
catChild.forEach(row => { // reset styles to support continuous transition on rapid show/hide
145144
row.style.transition = 'none' ; row.style.opacity = 0 })
146145
catChildrenDiv.offsetHeight // force reflow to insta-apply reset
@@ -152,7 +151,7 @@
152151
toggleCategorySettingsVisiblity(otherCategoryDiv.id, { action: 'hide' }))
153152
} else { // hide category settings
154153
Object.assign(catChildrenDiv.style, { height: 0, transition: '' })
155-
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' })
154+
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' }) // point it right
156155
}
157156
}
158157

chatgpt-infinity/chromium/extension/popup/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ body {
5050
}
5151
.menu-icon { padding: 8px }
5252
.menu-entry > label > .track { transform: scale(0.95) ; top: 1px } /* make child toggles smaller */
53+
.caret { position: absolute ; right: 14px ; transform: rotate(-90deg) }
5354
.categorized-entries { /* add left-stripe */
5455
border-left: 4px solid transparent ; height: 0 ; overflow: hidden ;
5556
border-image: linear-gradient(transparent, rgb(161 161 161)) 30 100%

chatgpt-infinity/firefox/extension/popup/controller.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
entry.leftElem.innerText = entryData.symbol || '⚙️'
3333
if (entryData.status) entry.label.textContent += ` — ${entryData.status}`
3434
}
35-
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', {
36-
size: 11, class: 'caret', style: 'position: absolute ; right: 14px ; transform: rotate(-90deg)' }))
35+
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', { size: 11, class: 'caret' }))
3736
entry.div.onclick = async () => {
3837
if (entryData.type == 'category') toggleCategorySettingsVisiblity(entryData.key)
3938
else if (entryData.type == 'toggle') {
@@ -141,8 +140,8 @@
141140
if (action != 'hide' && dom.get.computedHeight(catChildrenDiv) == 0) { // show category settings
142141
Object.assign(catChildrenDiv.style, { height: `${dom.get.computedHeight(catChild)}px`,
143142
transition: transitions && !env.browser.isFF ? 'height 0.25s' : '' })
144-
Object.assign(caret.style, { transform: '',
145-
transition: transitions ? 'transform 0.15s ease-out' : '' })
143+
Object.assign(caret.style, { // point it down
144+
transform: 'rotate(0deg)', transition: transitions ? 'transform 0.15s ease-out' : '' })
146145
catChild.forEach(row => { // reset styles to support continuous transition on rapid show/hide
147146
row.style.transition = 'none' ; row.style.opacity = 0 })
148147
catChildrenDiv.offsetHeight // force reflow to insta-apply reset
@@ -154,7 +153,7 @@
154153
toggleCategorySettingsVisiblity(otherCategoryDiv.id, { action: 'hide' }))
155154
} else { // hide category settings
156155
Object.assign(catChildrenDiv.style, { height: 0, transition: '' })
157-
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' })
156+
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' }) // point it right
158157
}
159158
}
160159

chatgpt-infinity/firefox/extension/popup/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ body {
5050
}
5151
.menu-icon { padding: 8px }
5252
.menu-entry > label > .track { transform: scale(0.95) ; top: 1px } /* make child toggles smaller */
53+
.caret { position: absolute ; right: 14px ; transform: rotate(-90deg) }
5354
.categorized-entries { /* add left-stripe */
5455
border-left: 4px solid transparent ; height: 0 ; overflow: hidden ;
5556
border-image: linear-gradient(transparent, rgb(161 161 161)) 30 100%

chatgpt-widescreen/chromium/extension/popup/controller.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
entry.leftElem.innerText = entryData.symbol || '⚙️'
4141
if (entryData.status) entry.label.textContent += ` — ${entryData.status}`
4242
}
43-
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', {
44-
size: 11, class: 'caret', style: 'position: absolute ; right: 14px ; transform: rotate(-90deg)' }))
43+
if (entryData.type == 'category') entry.div.append(icons.create('caretDown', { size: 11, class: 'caret' }))
4544
entry.div.onclick = () => {
4645
if (entryData.type == 'category') toggleCategorySettingsVisiblity(entryData.key)
4746
else if (entryData.type == 'toggle') {
@@ -99,8 +98,8 @@
9998
if (action != 'hide' && dom.get.computedHeight(catChildrenDiv) == 0) { // show category settings
10099
Object.assign(catChildrenDiv.style, { height: `${dom.get.computedHeight(catChild)}px`,
101100
transition: transitions && !env.browser.isFF ? 'height 0.25s' : '' })
102-
Object.assign(caret.style, { transform: '',
103-
transition: transitions ? 'transform 0.15s ease-out' : '' })
101+
Object.assign(caret.style, { // point it down
102+
transform: 'rotate(0deg)', transition: transitions ? 'transform 0.15s ease-out' : '' })
104103
catChild.forEach(row => { // reset styles to support continuous transition on rapid show/hide
105104
row.style.transition = 'none' ; row.style.opacity = 0 })
106105
catChildrenDiv.offsetHeight // force reflow to insta-apply reset
@@ -112,7 +111,7 @@
112111
toggleCategorySettingsVisiblity(otherCategoryDiv.id, { action: 'hide' }))
113112
} else { // hide category settings
114113
Object.assign(catChildrenDiv.style, { height: 0, transition: '' })
115-
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' })
114+
Object.assign(caret.style, { transform: 'rotate(-90deg)', transition: '' }) // point it right
116115
}
117116
}
118117

chatgpt-widescreen/chromium/extension/popup/style.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ body {
5050
}
5151
.menu-icon { padding: 8px }
5252
.menu-entry > label > .track { transform: scale(0.95) ; top: 1px } /* make child toggles smaller */
53+
.caret { position: absolute ; right: 14px ; transform: rotate(-90deg) }
54+
.caret { position: absolute ; right: 14px ; transform: rotate(-90deg) }
5355
.categorized-entries { /* add left-stripe */
5456
border-left: 4px solid transparent ; height: 0 ; overflow: hidden ;
5557
border-image: linear-gradient(transparent, rgb(161 161 161)) 30 100%

0 commit comments

Comments
 (0)