- Updated the dashboard settings partial to include a semi-transparent background for better visibility. - Introduced a new script for validating the syntax of dashboard item scripts, ensuring better error handling and diagnostics. - Added a comprehensive JavaScript file for managing dashboard items, including fetching, rendering, editing, and deleting items. - Implemented various utility functions for handling alerts, rewards, and modal interactions within the item management interface. - Created temporary scripts for debugging and parsing errors in item scripts, aiding in development and maintenance.
12 lines
485 B
JavaScript
12 lines
485 B
JavaScript
const fs = require('fs');
|
|
const path = '/home/shni/amayo/amayo/src/server/views/partials/dashboard/dashboard_items.ejs';
|
|
const s = fs.readFileSync(path,'utf8');
|
|
const m = s.match(/<script[^>]*>([\s\S]*?)<\/script>/i);
|
|
if(!m){ console.error('NO_SCRIPT'); process.exit(2); }
|
|
const src = m[1].replace(/\r\n/g,'\n');
|
|
const lines = src.split('\n');
|
|
for(let i=0;i<lines.length;i++){
|
|
console.log((i+1).toString().padStart(4,' ')+': '+lines[i]);
|
|
}
|
|
console.log('TOTAL LINES:', lines.length);
|