Skip to content

Commit

Permalink
Shortened notify() pos arg name ↞ [auto-sync from `KudoAI/chatgpt.j…
Browse files Browse the repository at this point in the history
…s-chrome-starter`]
  • Loading branch information
kudo-sync-bot committed Nov 17, 2024
1 parent 6930d7b commit 83c1947
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion starters/chrome/extension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// Add CHROME MSG listener
chrome.runtime.onMessage.addListener(req => {
if (req.action == 'notify') notify(req.msg, req.position)
if (req.action == 'notify') notify(req.msg, req.pos)
else if (req.action == 'alert') siteAlert(req.title, req.msg, req.btns)
else if (req.action == 'syncStorageToUI') syncStorageToUI()
})
Expand Down
4 changes: 2 additions & 2 deletions starters/chrome/extension/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@

// Define FEEDBACK functions

function notify(msg, position) {
function notify(msg, pos) {
chrome.tabs.query({ active: true, currentWindow: true }, (tabs) => {
chrome.tabs.sendMessage(tabs[0].id, {
action: 'notify', msg: msg, position: position || 'bottom-right' })
action: 'notify', msg: msg, pos: pos || 'bottom-right' })
})}

function alertToUpdate(version) {
Expand Down

0 comments on commit 83c1947

Please sign in to comment.