-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add files via upload #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I've requested some changes.
davidshimjs/qrcodejs has a smaller implementation of a QR code generator but it only outputs to an already rendered element so the way the output is rendered on this page would have to change significantly to save 20kb. Probably not worth it...
</script> | ||
</body> | ||
</html> | ||
<html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What did you do that caused the diff to be the entire file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why it did that, I just uploaded my modified index.html
<script src="nacl.js"></script> | ||
<script src="blake2b.js"></script> | ||
<script src="functions.js"></script> | ||
<script type="text/javascript" src="qrcode.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type attribute is not required here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used this example:
https://github.com/kazuhikoarase/qrcode-generator/tree/master/js
qraddress.addData(pair.address); | ||
qrseed.make(); | ||
qrkey.make(); | ||
qraddress.make(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of all this, put a qrcode
property on the object list below and then in the map function so you can re-use the same code for each field:
.map(function(item) {
return '<div><dt>' + item.label + ':</dt></div>' +
'<div><dd>' +
('qrcode' in item ? qrcode(4, 'L').addData(item.qrcode).make().createImgTag() : '') +
'<span class="dont-break-out">' + item.value + '</span>' +
'</dd></div>';
})
Put some CSS to make the image display decently. Maybe even special coloring around the seed/private key qrcodes than the account address qrcode so that people don't get them mixed up.
Also maybe a checkbox on the top of the page 'Generate QR Codes' or 'Generate QR Codes for Private Keys' that is by-default unchecked. Some people may not want their seed/private key easily scannable by somebody standing next to them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit that I'm clueless on web design, I just needed QR codes for my paper wallets and somehow I managed to do it without really knowing what I'm doing. I thought it might be useful to other people so I uploaded it but obviously you can do much better.
@@ -0,0 +1,2136 @@ | |||
//--------------------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know how this entire file works so that we can be sure that it does not contain any exploits that reveal a user's private keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the reference to the file from bitaddress.org.
Anyway, paper wallets should be generated on an offline computer, other than QR not same as text, no exploit can occur offline.
qraddress.addData(pair.address); | ||
qrseed.make(); | ||
qrkey.make(); | ||
qraddress.make(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must admit that I'm clueless on web design, I just needed QR codes for my paper wallets and somehow I managed to do it without really knowing what I'm doing. I thought it might be useful to other people so I uploaded it but obviously you can do much better.
</script> | ||
</body> | ||
</html> | ||
<html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why it did that, I just uploaded my modified index.html
<script src="nacl.js"></script> | ||
<script src="blake2b.js"></script> | ||
<script src="functions.js"></script> | ||
<script type="text/javascript" src="qrcode.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used this example:
https://github.com/kazuhikoarase/qrcode-generator/tree/master/js
Ok, adding QR codes is not a huge priority for me but I may integrate this at some point. I'll leave this open so others can see it in the meantime or if you want to add more commits. |
I added QR code for the Seed, Key & Address