Skip to content

Commit

Permalink
chrome.runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-j committed Dec 10, 2021
1 parent bf5af08 commit f6997aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/eventPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ if (typeof safari !== 'undefined') {
})
}, false)
} else {
const onMessage = chrome.extension.onMessage ? chrome.extension.onMessage : chrome.runtime.onMessage

onMessage.addListener(function (request, sender, sendResponse) {
chrome.runtime.onMessage.addListener(function (request, sender, sendResponse) {
if (typeof request === 'string') {
console.log('Fetching', request)
fetch(request, 'blob').then((blob) => {
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ try {
pageStoryId = document.location.pathname.match(/^\/story\/(\d*)/)[1]
} catch (e) {}

const logoUrl = chrome.extension.getURL('fimfic2epub-logo.png')
const logoUrl = chrome.runtime.getURL('fimfic2epub-logo.png')
let ffc
const stories = document.querySelectorAll('.story_container')

Expand Down

0 comments on commit f6997aa

Please sign in to comment.