Skip to content

Commit

Permalink
#1 init iframe handlers first
Browse files Browse the repository at this point in the history
  • Loading branch information
motorina0 committed May 27, 2021
1 parent 637a056 commit b612a7a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/views/content-inject/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import routes from './routes'


try {
initIFrame()
// Mozilla's polyfill
Vue.prototype.$browser = require('webextension-polyfill')
Vue.use(VueRouter)
Vue.use(Quasar)
Vue.component('qrcode', VueQrcode)


const router = new VueRouter({
routes
Expand Down Expand Up @@ -44,6 +45,13 @@ try {
})
}, false);


} catch (err) {
browser.runtime.sendMessage('hide_iframe')
console.error(err)
}

function initIFrame() {
document.getElementById('lnbits-overlay')
.addEventListener('click', function () {
browser.runtime.sendMessage('hide_iframe')
Expand All @@ -54,8 +62,4 @@ try {
// remove any quasar injected background color
document.body.style.background = 'none';
})
} catch (err) {
browser.runtime.sendMessage('hide_iframe')
console.log("!!!!!!!!!!!!!!!!")
console.error(err)
}

0 comments on commit b612a7a

Please sign in to comment.