UI - 'Request body' section disappears after switching from 'Playwright' to 'System settings default' and back on 'Request' tab - Fixed #1449
This commit is contained in:
15
changedetectionio/static/js/vis.js
Normal file
15
changedetectionio/static/js/vis.js
Normal file
@@ -0,0 +1,15 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
// Lazy Hide/Show elements mechanism
|
||||
$('[data-visible-for]').hide();
|
||||
$(':radio').on('keyup keypress blur change click', function (e) {
|
||||
$('[data-visible-for]').hide();
|
||||
var n = $(this).attr('name') + "=" + $(this).val();
|
||||
if (n === 'fetch_backend=system') {
|
||||
n = "fetch_backend=" + default_system_fetch_backend;
|
||||
}
|
||||
$(`[data-visible-for~="${n}"]`).show();
|
||||
|
||||
});
|
||||
$(':radio:checked').change();
|
||||
});
|
||||
Reference in New Issue
Block a user