const minisrv_service_file = true;
const notImplementedAlert = new clientShowAlert({
'image': minisrv_config.config.service_logo,
'message': "This feature is not available.",
'buttonlabel1': "Okay",
'buttonaction1': "client:donothing",
'noback': true,
}).getURL();
const settings = [
["wtv-setup:/mail", "Mail Signature"],
["wtv-setup:/edit-password", "Edit Password"],
["wtv-setup:/accounts", "Account & Users"],
["wtv-setup:/text", "Text Size"],
["wtv-setup:/sound", "Background Music"],
[notImplementedAlert, "Printing"],
["wtv-setup:/keyboard", "On-Screen Keyboard"],
["wtv-setup:/screen", "Screen"],
["wtv-setup:/messenger", "MSN Messenger"],
["wtv-setup:/phone", "Dialing"],
["wtv-setup:/region", "Timezone & Region"],
["wtv-setup:/tweaks", "Tweaks"]
]
function removeSettingByUrl(url) {
for (let i = settings.length - 1; i >= 0; i--) {
if (settings[i][0] === url) {
settings.splice(i, 1);
}
}
}
if (minisrv_config.config.hide_incomplete_features) {
removeSettingByUrl(notImplementedAlert);
}
/* We need to fix most webtv viewers for this, since they spoof a build that doesn't support messenger?
if (!session_data.hasCap("client-can-use-messenger")) {
removeSettingByUrl("wtv-setup:/messenger");
}
*/
headers = `200 OK
Connection: Keep-Alive
wtv-expire-all: wtv-
wtv-expire-all: http
Content-Type: text/html`
data = `
Settings
|
|
|
Settings
for ${session_data.getSessionData("subscriber_username") || "You"}
|
| |
| | `;
for (let i = 0; i < settings.length; i += 2) {
data += `
|
|
| ${(settings[i][0] !== "") ? ` ${settings[i][1]}` : ` `}
|
| `
if (i + 1 < settings.length) {
data += (settings[i + 1][0] !== "") ? ` ${settings[i + 1][1]}` : ` `
} else {
// require even number of settings
data += " "
}
}
data += ` | |
`; |
|