Fixed shared URL representation
This commit is contained in:
@@ -16,6 +16,7 @@ function saveBlob(blob, fname, successCb, errorCb) {
|
||||
}
|
||||
|
||||
function hi2gopher(hiurl) {
|
||||
if(!hiurl.startsWith('hi:')) return hiurl
|
||||
var parts = hiurl.split(':')[1].split('|')
|
||||
return 'gopher://'+parts[2]+':'+parts[3]+'/'+parts[0]+parts[1]
|
||||
}
|
||||
@@ -108,7 +109,7 @@ addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
function loadURL(url, noNavUpdate) { // wrapper to openURL that actually updates all the UI and history
|
||||
logoStatus.textContent = logoLoadingChar
|
||||
statusBar.textContent = 'Loading ' + url
|
||||
statusBar.textContent = 'Loading ' + hi2gopher(url)
|
||||
openURL(url, function(res) { // success callback
|
||||
logoStatus.textContent = logoDefaultChar
|
||||
statusBar.textContent = ''
|
||||
@@ -314,7 +315,7 @@ addEventListener('DOMContentLoaded', function() {
|
||||
navigator.mozApps.getSelf().then(function(app) {
|
||||
var mfst = app.manifest
|
||||
var aboutText = mfst.name + ' v' + mfst.version + ' by ' + mfst.developer.name
|
||||
aboutText += '\nPage: ' + currentUrl
|
||||
aboutText += '\nPage: ' + hi2gopher(currentUrl)
|
||||
alert(aboutText)
|
||||
})
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user