prevent password save prompt on key field
This commit is contained in:
parent
ffaf00a130
commit
568c92cbf9
@ -74,15 +74,25 @@ function dashboard () {
|
||||
$('#keybox').val('A'.repeat(36))
|
||||
$('#keybox').on('click', function (e) {
|
||||
$(this)[0].select()
|
||||
$(this)[0].setSelectionRange(0, key.length)
|
||||
$(this)[0].setSelectionRange(0, $(this).val().length)
|
||||
})
|
||||
|
||||
$('#keybox').on('change', function (e) {
|
||||
if (!shown) {
|
||||
$('#keybox').val('A'.repeat(36))
|
||||
} else {
|
||||
$('#keybox').val(key)
|
||||
}
|
||||
})
|
||||
|
||||
$('#show_key').on('click', function (e) {
|
||||
if (shown) {
|
||||
$('#keybox').val('A'.repeat(36))
|
||||
$('#keybox').attr('type', 'password')
|
||||
$('#keybox').attr('readonly', true)
|
||||
$(this).text('Reveal Key')
|
||||
} else {
|
||||
$('#keybox').removeAttr('readonly')
|
||||
$('#keybox').val(key)
|
||||
$('#keybox').attr('type', 'text')
|
||||
$(this).text('Hide Key')
|
||||
|
@ -88,7 +88,7 @@
|
||||
<label>Stream Key</label>
|
||||
</div>
|
||||
<div class="col">
|
||||
<input type="password" id="keybox">
|
||||
<input type="password" id="keybox" autocomplete="off" readonly>
|
||||
<button href="#" id="show_key" class="btn btn-primary">Reveal Key</button>
|
||||
<button href="#" id="copy_key" class="btn btn-success">Copy</button>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user