$( document ).ready( () => { $('body').scrollspy({ target: '#main-nav', offset: 130 }) $('#fullpage').fullpage({ // anchors: ['underPage', 'gradPage', 'phdPage'], sectionsColor: ['#ffffff', '#f8f8f8'], autoScrolling: false, css3: true, fitToSection: false, afterLoad: function(anchorLink, index) { // history.pushState(null, null, ""); // console.log(anchorLink); } }); $("a").on('click', function(event) { // Make sure this.hash has a value before overriding default behavior if (this.hash !== "") { // Prevent default anchor click behavior event.preventDefault(); // Store hash var hash = this.hash; // Using jQuery's animate() method to add smooth page scroll // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area var offset = 0; if (hash === "#home") { offset = -100; } else { offset = -60; } $('html, body').animate({ scrollTop: ($(hash).offset().top + offset) }, 1000, function(){ // Add hash (#) to URL when done scrolling (default click behavior) // window.location.hash = hash; }); } }); // initialize with defaults // $("#uploadfile").fileinput(); // with plugin options $("#uploadfile").fileinput({ // theme: "fa", 'theme': 'fas', showUpload:false, previewFileType:'py', maxFileCount: 1, allowedFileExtensions: ["py"] }); ConsoleLogHTML.connect(document.getElementById("console")); // Redirect log messages // ConsoleLogHTML.disconnect(); // Stop redirecting var url = window.location; // GET REQUEST $("#btnGetFiles").click( (event) => { event.preventDefault(); ajaxGet(); }); // DO GET function ajaxGet(){ $.ajax({ type : "GET", url : "/api/files/getall", success: (data) => { //clear old data $("#listFiles").html(""); /* render list of files */ $("#listFiles").append('