MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / getDatabasePath

Function getDatabasePath

main.js:6784–6826  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6782 },
6783 title: title || 'Input',
6784 show: false,
6785 backgroundColor: '#2d2d2d'
6786 });
6787
6788 // Escape HTML to prevent XSS
6789 const escapeHtml = (text) => {
6790 return String(text || '')
6791 .replace(/&/g, '&')
6792 .replace(/</g, '&lt;')
6793 .replace(/>/g, '&gt;')
6794 .replace(/"/g, '&quot;')
6795 .replace(/'/g, '&#039;');
6796 };
6797
6798 // Create HTML for the input dialog
6799 const safeMessage = escapeHtml(message || 'Enter value:');
6800 const safePlaceholder = escapeHtml(placeholder || '');
6801 const safeDefaultValue = escapeHtml(defaultValue || '');
6802
6803 const html = `
6804 <!DOCTYPE html>
6805 <html>
6806 <head>
6807 <meta charset="UTF-8">
6808 <style>
6809 body {
6810 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
6811 background-color: #2d2d2d;
6812 color: #fff;
6813 margin: 0;
6814 padding: 20px;
6815 display: flex;
6816 flex-direction: column;
6817 height: 100vh;
6818 box-sizing: border-box;
6819 }
6820 .message {
6821 margin-bottom: 15px;
6822 font-size: 14px;
6823 }
6824 input {
6825 width: 100%;
6826 padding: 8px;
6827 background-color: #444;
6828 border: 1px solid #555;
6829 border-radius: 4px;

Callers 4

startHttpServerFunction · 0.85
main.jsFile · 0.85
initializeDatabaseFunction · 0.85
purgeModelsHandlerFunction · 0.85

Calls 2

debugLogFunction · 0.70

Tested by

no test coverage detected