diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-07-24 10:10:57 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-07-24 10:10:57 +0800 |
commit | d5929e5c42e230fc0a52337f86b5850e68516563 (patch) | |
tree | 12514016dd7e0612b9ad724637e8a855b3ac0f46 /app/scripts/contentscript.js | |
parent | f7ad978474f42eb96f4f6c79376391504cf228c1 (diff) | |
download | tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.gz tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.bz2 tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.lz tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.xz tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.tar.zst tangerine-wallet-browser-d5929e5c42e230fc0a52337f86b5850e68516563.zip |
added qr code scanner icon in send transaction
Diffstat (limited to 'app/scripts/contentscript.js')
-rw-r--r-- | app/scripts/contentscript.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/scripts/contentscript.js b/app/scripts/contentscript.js index 87f7c63ef..83ed85a1a 100644 --- a/app/scripts/contentscript.js +++ b/app/scripts/contentscript.js @@ -205,7 +205,7 @@ function initQrCodeScanner () { // Append preview div const preview = document.createElement('div') preview.id = 'metamask-preview-wrapper' - preview.style = 'position:absolute; top: 20px; left: 20px; width: 300px; height: 300px; overflow: hidden; z-index: 999999999;' + preview.style = 'position:fixed; top: 20px; left: 20px; width: 300px; height: 300px; overflow: hidden; z-index: 999999999;' const previewVideo = document.createElement('video') previewVideo.id = 'metamask-preview-video' previewVideo.style = 'width: 100%; height: 100%; object-fit: none; margin-left: -10%; margin-top: 10%;' @@ -218,14 +218,11 @@ function initQrCodeScanner () { continuous: true, }) scanner.addListener('scan', function (content) { - console.log('QR-SCANNER: got code (IN-PAGE)', content) scanner.stop().then(_ => { - console.log('QR-SCANNER: stopped scanner and sending msg (IN-PAGE)', content) extension.runtime.sendMessage({ action: 'qr-code-scanner-data', data: content, }) - console.log('QR-SCANNER: message sent (IN-PAGE)', content) document.getElementById('metamask-preview-wrapper').parentElement.removeChild(document.getElementById('metamask-preview-wrapper')) }) }) @@ -241,8 +238,6 @@ function initQrCodeScanner () { } extension.runtime.onMessage.addListener(({ action }) => { - console.log('QR-SCANNER: message received (IN-PAGE)', action) initQrCodeScanner() }) -console.log('QR-SCANNER: now listening (IN-PAGE)') |