Skip to content

Commit

Permalink
Shortened notify() pos arg name
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Nov 17, 2024
1 parent 4f9e617 commit 5aafbd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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 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 5aafbd2

Please sign in to comment.