poweredby url

This commit is contained in:
zefie
2025-08-07 20:47:59 -04:00
parent 8c844ce091
commit 932593aa21
3 changed files with 13 additions and 5 deletions

View File

@@ -2,7 +2,6 @@ var minisrv_service_file = true;
headers = `200 OK
Content-type: text/html
wtv-expire-all: wtv-flashrom:
minisrv-no-mail-count: true`
if (socket.ssid && ssid_sessions[socket.ssid]) {

View File

@@ -560,7 +560,7 @@ block += `
<td width="30%" valign="middle">
<center>
<font size="-2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><i>
<a href="http://${this.getPublishDomain()}">Powered by ${this.minisrv_config.config.service_name}</a>
<a href="http://${this.getPoweredBy()}">Powered by ${this.minisrv_config.config.service_name}</a>
</i></font></center>
</td>
<td width="30%" valign="middle" align="right">
@@ -604,7 +604,7 @@ html += `">previous page</a>
<td width="30%" valign="middle">
<center>
<font size="-2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><i>
<a href="http://${this.getPublishDomain()}">Powered by ${this.minisrv_config.config.service_name}</a>
<a href="http://${this.getPoweredBy()}">Powered by ${this.minisrv_config.config.service_name}</a>
</i></font></center>
</td>
<td width="30%" valign="middle" align="right">
@@ -640,7 +640,7 @@ html += `">previous page</a>
<td width="30%" valign="middle">
<center>
<font size="-2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><i>
<a href="http://${this.getPublishDomain()}">Powered by ${this.minisrv_config.config.service_name}</a>
<a href="http://${this.getPoweredBy()}">Powered by ${this.minisrv_config.config.service_name}</a>
</i></font></center>
</td>
<td width="30%" valign="middle" align="right">
@@ -672,7 +672,7 @@ html += `">next page</a>
<td width="30%" valign="middle">
<center>
<font size="-2" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><i>
<a href="http://${this.getPublishDomain()}">Powered by ${this.minisrv_config.config.service_name}</a>
<a href="http://${this.getPoweredBy()}">Powered by ${this.minisrv_config.config.service_name}</a>
</i></font></center>
</td>
<td width="30%" valign="middle" align="right">
@@ -777,6 +777,14 @@ html += `">next page</a>
}
}
getPoweredBy() {
if (this.minisrv_config.services['wtv-author'].powered_by_url) {
return this.minisrv_config.services['wtv-author'].powered_by_url;
} else {
return this.getPublishDomain();
}
}
getPublishDir() {
var destDir = false;
if (this.minisrv_config.services['wtv-author'].publish_mode == "service") {

View File

@@ -338,6 +338,7 @@
"max_pages": 4,
"publish_mode": "service", // "service" or "directory"
"publish_dest": "pb_services", // service name, or directory path
"powered_by_url": null, // Set to a URL to have a custom "Powered by" link. If null, it will use the publish domain.
"modules": [
"WTVAuthor"
]