Skip to content

Commit

Permalink
Shortened value to val in create methods ↞ [auto-sync from `ada…
Browse files Browse the repository at this point in the history
…mlui/chatgpt-apps/chatgpt-widescreen/opera`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 27, 2024
1 parent 2b89c96 commit 636ae16
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions chrome/extension/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const dom = {
const anchor = document.createElement('a'),
defaultAttrs = { href: linkHref, target: '_blank', rel: 'noopener' },
finalAttrs = { ...defaultAttrs, ...attrs }
Object.entries(finalAttrs).forEach(([attr, value]) => anchor.setAttribute(attr, value))
Object.entries(finalAttrs).forEach(([attr, val]) => anchor.setAttribute(attr, val))
if (displayContent) anchor.append(displayContent)
return anchor
},

elem(elemType, attrs = {}) {
const elem = document.createElement(elemType)
Object.entries(attrs).forEach(([attr, value]) => elem.setAttribute(attr, value))
Object.entries(attrs).forEach(([attr, val]) => elem.setAttribute(attr, val))
return elem
},

Expand Down
4 changes: 2 additions & 2 deletions edge/extension/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const dom = {
const anchor = document.createElement('a'),
defaultAttrs = { href: linkHref, target: '_blank', rel: 'noopener' },
finalAttrs = { ...defaultAttrs, ...attrs }
Object.entries(finalAttrs).forEach(([attr, value]) => anchor.setAttribute(attr, value))
Object.entries(finalAttrs).forEach(([attr, val]) => anchor.setAttribute(attr, val))
if (displayContent) anchor.append(displayContent)
return anchor
},

elem(elemType, attrs = {}) {
const elem = document.createElement(elemType)
Object.entries(attrs).forEach(([attr, value]) => elem.setAttribute(attr, value))
Object.entries(attrs).forEach(([attr, val]) => elem.setAttribute(attr, val))
return elem
},

Expand Down
4 changes: 2 additions & 2 deletions opera/extension/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const dom = {
const anchor = document.createElement('a'),
defaultAttrs = { href: linkHref, target: '_blank', rel: 'noopener' },
finalAttrs = { ...defaultAttrs, ...attrs }
Object.entries(finalAttrs).forEach(([attr, value]) => anchor.setAttribute(attr, value))
Object.entries(finalAttrs).forEach(([attr, val]) => anchor.setAttribute(attr, val))
if (displayContent) anchor.append(displayContent)
return anchor
},

elem(elemType, attrs = {}) {
const elem = document.createElement(elemType)
Object.entries(attrs).forEach(([attr, value]) => elem.setAttribute(attr, value))
Object.entries(attrs).forEach(([attr, val]) => elem.setAttribute(attr, val))
return elem
},

Expand Down

0 comments on commit 636ae16

Please sign in to comment.