12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- function showDiv(select){
- if(select.value!=1){
- document.getElementById('hidden_div').style.display = 'block';
- } else{
- document.getElementById('hidden_div').style.display = 'none';
- }
- }
- document.addEventListener('DOMContentLoaded', () => {
- (document.querySelectorAll('.toggle') || []).forEach(($toggle) => {
- $toggle.addEventListener('click', () => {
- });
- });
- });
- document.addEventListener('DOMContentLoaded', () => {
- // Get all "navbar-burger" elements
- const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
- // Add a click event on each of them
- $navbarBurgers.forEach( el => {
- el.addEventListener('click', () => {
- // Get the target from the "data-target" attribute
- const target = el.dataset.target;
- const $target = document.getElementById(target);
- // Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
- el.classList.toggle('is-active');
- $target.classList.toggle('is-active');
- });
- });
- });
- document.addEventListener('DOMContentLoaded', () => {
- (document.querySelectorAll('.notification .delete') || []).forEach(($delete) => {
- const $notification = $delete.parentNode;
- $delete.addEventListener('click', () => {
- $notification.parentNode.removeChild($notification);
- });
- });
- });
- document.addEventListener('DOMContentLoaded', () => {
- (document.querySelectorAll('#endpointURL') || []).forEach(($urlInput) => {
- $urlInput.addEventListener('input', (e) => {
- window.localStorage.setItem("uri", e.target.value);
- console.log('Storing uri input ' + e.target.value);
- });
- });
- });
- document.addEventListener('DOMContentLoaded', () => {
- let data = window.localStorage.getItem("uri");
- if (data) {
- (document.querySelectorAll('#endpointURL') || []).forEach(($urlInput) => {
- $urlInput.setAttribute('value', data);
- console.log('Setting uri input to ' + data);
- });
- }
- });
|