Closed RonStrauss closed 2 years ago
Currently looking in to it. Wasn't aware this was a browser feature
Thanks for the quick reply 😃
Now that I think about it, username
would be a more fitting property for the autocomplete.
I'm currently working on an implementation of the mentioned <select>
method, using localstorage
with javascript. Hope it will be useful for you 😄
This implementation works with limited testing. demo at http://gw2crafts.net/demo.html -- lmk if that matches what you are looking for and I'll push my code/close this
page.append('<br /><br /><iframe name="dummyframe" id="dummyframe" style="display: none;"></iframe><form id ="gw2apiform" target="dummyframe"><input type="text" id="api_key" name="gw2 api key" autocomplete="one-time-code" placeholder="Enter API key here" style=\'text-align: center;\'></form><br />')
page.append('<button type="submit" form="gw2apiform" onclick="updateBank(document.getElementById(\'api_key\').value.trim());" style=\'text-align: center;\'>Get Bank Content</button>\n')
I've been in the slow/lazy process of rebuilding the site ( see https://gw2crafts.net/beta/armorcrafting.html ) but I don't know if/what that will go live.
The rebuild looks great!
Doesn't seem to trigger an auto-complete prompt for me, for some reason. Maybe that's just on my end.
I'm sorry, just read the 'about' page and noticed you're against implementing localstorage, my bad!
Doesn't seem to trigger an auto-complete prompt for me, for some reason. Maybe that's just on my end.
Tested on firefox and chrome, what browser are you using?
I'm sorry, just read the 'about' page and noticed you're against implementing localstorage, my bad!
I'm fine with local storage, that was just a statement of the site at that time. The rewrite is going to use local storage for most recent api key (keep only 1 probably)
Running latest chrome 101.0.4951.54, windows 10 (64-bit).
Version 101.0.4951.67 (Official Build) (64-bit)
here. Shouldn't make a difference with a feature this old.
To be clear, only the demo page has it implemented atm.
Yes I'm trying it on demo.html
, it's probably something on my end.
EDIT: It was something on my end, some flags in the experimental features. Consider this closed @xanthics 😃
Excellent. I've pushed 8bdc143515d78f8cb2e6e78994e7fa36c8566df8 and am generating a set of guides that will include this autocomplete implementation.
I had an idea to add a QoL improvement to remember your used API keys.
The first idea that came to mind is to add
autocomplete="one-time-code"
to#api_key
's attributes, located inMyPrint.py
.Another would be to add a
<select>
so the user could add associated information to each key. I'd be happy to do it if you don't mind.