Initial commit

This commit is contained in:
Joey Kimsey
2024-08-04 21:15:59 -04:00
parent c9d1fb983f
commit 0d469501ee
695 changed files with 70184 additions and 71 deletions

View File

@ -0,0 +1,32 @@
function setIcon(iconName, iconText) {
document.getElementById('iconValue').value = iconName;
document.getElementById('selected-icon').innerHTML = '<span class="glyphicon glyphicon-' + iconName + '"></span> ' + iconText;
}
$( document ).ready( function () {
function autosave() {
var title = $( "#title" ).val();
var color = $( "#color" ).val();
var notebookID = $( "#notebookID" ).val();
var noteID = $( "#noteID" ).val();
var note = $( "#note" ).val();
$.post( "/notes/autoUpdate/" + noteID, {
title: title,
color: color,
notebookID: notebookID,
note: note,
});
console.log( 'note saved' );
}
var lastSegment = window.location.pathname.split('/').pop();
if (!isNaN(lastSegment)) {
if (window.location.pathname.endsWith('/notes/byNote/'+lastSegment)) {
console.log( 'autosave enabled' );
setInterval(autosave, 60 * 1000);
}
}
});