const minisrv_service_file = true; const notAdminAlert = new clientShowAlert({ 'image': minisrv_config.config.service_logo, 'message': "Sorry, you are not configured as an admin on this server.

If you are the server operator, please
see user_config.example.json
for an example on how to configure yourself as an administrator.", 'buttonlabel1': "Ugh, fine.", 'buttonaction1': "client:donothing", 'noback': true, }).getURL(); headers = `200 OK Content-Type: text/html` const tricks = [ ["wtv-tricks:/info", minisrv_config.config.service_name + " info"], ["wtv-cookie:list", "List Cookies"], ["wtv-cookie:reset", "Clear Cookies"], ["wtv-tricks:/blastbacklist?return_to=wtv-tricks%3A%2Ftricks", "Blast Backlist"], ["client:ResetNVAndPowerOff", "Blast NVRAM"], ["wtv-tricks:/charmap", "Character Map"], ["wtv-tricks:/cSetup", "Connect Setup"], ["wtv-disk:/content/Downloads.tmpl", "Download-O-Rama"], ["wtv-tricks:/benchmark", "Speed Test"], ["wtv-flashrom:/big-willie", "Big Willie"], ["wtv-flashrom:/willie", "Ultra Willie"], ["wtv-setup:/transfer-account", "Transfer Account"], ["wtv-proxy:/proxy", "Web Render Proxy"], ] // add these at the bottom tricks.push((session_data.getSessionData("registered")) ? ["wtv-tricks:/unregister", "Unregister This Box"] : ["wtv-tricks:/register", "Register This Box"]); // reg/unreg tricks.push((wtvshared.isAdmin(session_data)) ? ["wtv-admin:/admin", minisrv_config.config.service_name + " Admin"] : [notAdminAlert, minisrv_config.config.service_name + " Admin"]); // wtv-admin data = ` ${minisrv_config.config.service_name} Tricks

${minisrv_config.config.service_name} Tricks

 
 `; for (let i = 0; i < tricks.length; i += 2) { data += `
${(tricks[i][0] !== "") ? `€ ${tricks[i][1]}` : `  `} ` if (i + 1 < tricks.length) { data += (tricks[i + 1][0] !== "") ? `€ ${tricks[i + 1][1]}` : `  ` } else { // require even number of tricks data += "  " } } data += `
`;