alpine.min.js
5 years ago
deloldp_alpine.js
7 months ago
delp_multi_select.js
7 months ago
delp_script.js
1 month ago
delp_script.js
15 lines
| 1 | document.addEventListener("DOMContentLoaded", (event) => { |
| 2 | const global_redirects_url_del = document.querySelector(".global-redirect-url-input-wrapper .after"); |
| 3 | const global_redirects_home_link = document.querySelector("#global_redirects_home_link"); |
| 4 | const global_redirects_input = document.querySelector("#global_redirect_url"); |
| 5 | |
| 6 | global_redirects_home_link.addEventListener("click", (event) => { |
| 7 | event.preventDefault(); |
| 8 | global_redirects_input.value = event.target.dataset.href |
| 9 | }); |
| 10 | |
| 11 | global_redirects_url_del.addEventListener('click', () => { |
| 12 | global_redirects_input.value = ''; |
| 13 | global_redirects_url_del.style.display = 'none'; // hide 'x' on input hover |
| 14 | }); |
| 15 | }); |