Merge pull request #526 from hakadao/bugfixes

Bugfixes
This commit is contained in:
Hakadao
2024-04-12 17:37:30 +08:00
committed by GitHub
2 changed files with 12 additions and 7 deletions

View File

@@ -19,6 +19,6 @@ jobs:
token: ${{ secrets.RELEASE_TOKEN }}
release-type: node
package-name: release-please-action
release-as: 0.16.2
release-as: 0.16.4
signoff: 'github-actions <41898282+github-actions[bot]@users.noreply.github.com>'
changelog-types: '[{"type":"types","section":"Types","hidden":false},{"type":"revert","section":"Reverts","hidden":false},{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"improvement","section":"Feature Improvements","hidden":false},{"type":"docs","section":"Docs","hidden":false},{"type":"i18n","section":"I18n","hidden":true},{"type":"style","section":"Style Changes","hidden":false},{"type":"ci","section":"CI","hidden":false},{"type":"chore","section":"Miscellaneous","hidden":true},{"type":"contributor","section":"New Contributors","hidden":false},{"type":"notice","section":"Notices","hidden":false}]'

View File

@@ -14,10 +14,15 @@ import API_VIDEO from './video'
import API_WATCHLATER from './watchLater'
export function setupAllMsgLstnrs() {
// Merge all API objects into one
const FullAPI = Object.assign({}, API_AUTH, API_ANIME, API_HISTORY, API_FAVORITE, API_MOMENT, API_NOTIFICATION, API_RANKING, API_SEARCH, API_USER, API_VIDEO, API_WATCHLATER)
// Create a message listener for each API
const handleMessage = apiListenerFactory(FullAPI)
browser.runtime.onMessage.removeListener(handleMessage)
browser.runtime.onMessage.addListener(handleMessage)
browser.runtime.onConnect.removeListener(handleConnect)
browser.runtime.onConnect.addListener(handleConnect)
function handleConnect() {
// Merge all API objects into one
const FullAPI = Object.assign({}, API_AUTH, API_ANIME, API_HISTORY, API_FAVORITE, API_MOMENT, API_NOTIFICATION, API_RANKING, API_SEARCH, API_USER, API_VIDEO, API_WATCHLATER)
// Create a message listener for each API
const handleMessage = apiListenerFactory(FullAPI)
browser.runtime.onMessage.removeListener(handleMessage)
browser.runtime.onMessage.addListener(handleMessage)
}
}