Fixed empty selector behavior for better compatibility with Floodgap indexes

This commit is contained in:
Luxferre
2023-03-26 22:35:30 +03:00
parent 20d4027e3f
commit 5ce5069a70
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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
+1 -1
View File
@@ -1,5 +1,5 @@
{
"version": "0.0.2",
"version": "0.0.3",
"name": "Kopher",
"description": "A Gopher client for KaiOS",
"launch_path": "/index.html",