commit 5ce5069a70685d5789a3eb5a530b8f8cb1c29139
parent 20d4027e3f4de1684d6368e52f1d0ab8d103fc19
Author: Luxferre <lux@ferre>
Date: Sun, 26 Mar 2023 22:35:30 +0300
Fixed empty selector behavior for better compatibility with Floodgap indexes
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/js/hi01379.js b/js/hi01379.js
@@ -28,8 +28,8 @@ Hi01379 = (function(psGopherRequest) {
sel = rest.length > 1 ? rest[1] : '' // selector
host = rest.length > 2 ? rest[2] : '' // hostname
port = rest.length > 3 ? (0|rest[3]) : '' // port
- // check for the empty fields
- if(!sel) sel = desc // selector defaults to the description
+ // selector defaults to the description only if there are no other fields
+ if(!sel && rest.length < 2) sel = desc
if(!host) host = chost // host defaults to the current host
if(!port) port = cport // port defaults to the current port
if(type == 'i') { // information message - wrap them in pretag
diff --git a/manifest.webapp b/manifest.webapp
@@ -1,5 +1,5 @@
{
- "version": "0.0.2",
+ "version": "0.0.3",
"name": "Kopher",
"description": "A Gopher client for KaiOS",
"launch_path": "/index.html",