v0.0.6
This commit is contained in:
@@ -120,7 +120,7 @@ All these limitations are intended to keep Kopher's codebase simple, and not lik
|
|||||||
|
|
||||||
## How does Kopher integrate with the rest of KaiOS?
|
## How does Kopher integrate with the rest of KaiOS?
|
||||||
|
|
||||||
It almost doesn't. But, whatever could be done without hacks, has been done since the version 0.0.6. First, you can share the current URL (in the `gopher://` format) using Bluetooth/Messages/Email share menu (if you select Bluetooth or any other provider that requires blobs, it gets sent as a vCard 2.1 file with the `N` and `URL` fields set to the same value) by pressing `*` and Call key. Second, Kopher itself registers a `view` activity handler for every URL that starts with `gopher:`. If you just updated Kopher to version 0.0.6, you need to reboot your phone for this feature to start working. For some reason, `gopher:` URLs still aren't picked up by the stock KaiOS browser or the `window.open()` call, but any other application that sends URLs to the `view` activity according to the spec should be able to open `gopher://` URLs in Kopher.
|
It almost doesn't. But, whatever could be done without hacks, has been done since the version 0.0.6. First, you can share the current URL (in the `gopher://` format) using Bluetooth/Messages/Email share menu (if you select Bluetooth or any other provider that requires blobs, it gets sent as a vCard 2.1 file with the `N` and `URL` fields set to the same value) by pressing `*` and Call key. Second, Kopher itself registers a `view` activity handler for every URL that starts with `gopher:`. If you just updated Kopher to version 0.0.6, you need to reboot your phone for this feature to start working. In the current state of KaiOS, `gopher:` URLs aren't picked up and translated into proper activities by the stock KaiOS browser or the `window.open()` call, but any other application that sends URLs to the `view` activity according to the spec should be able to open `gopher://` URLs in Kopher.
|
||||||
|
|
||||||
## Can I use the hi01379.js library in non-KaiOS environments?
|
## Can I use the hi01379.js library in non-KaiOS environments?
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ addEventListener('DOMContentLoaded', function() {
|
|||||||
statusBar = document.querySelector('footer div.status'),
|
statusBar = document.querySelector('footer div.status'),
|
||||||
themeKey = 'uitheme', bookmarkKey = 'bookmarks', bkNumber,
|
themeKey = 'uitheme', bookmarkKey = 'bookmarks', bkNumber,
|
||||||
history = [], historyIndex = 0, linkIndex = 0,
|
history = [], historyIndex = 0, linkIndex = 0,
|
||||||
verticalScrollStep = 20, horizontalScrollStep = 20,
|
verticalScrollStep = 40, horizontalScrollStep = 20,
|
||||||
buf = '', emptyBk = '["","","","","","","","","","",""]'
|
buf = '', emptyBk = '["","","","","","","","","","",""]'
|
||||||
|
|
||||||
function getTheme() {
|
function getTheme() {
|
||||||
@@ -338,17 +338,13 @@ addEventListener('DOMContentLoaded', function() {
|
|||||||
//setup the theme
|
//setup the theme
|
||||||
updateTheme()
|
updateTheme()
|
||||||
|
|
||||||
// load the homepage if present and we're not in an activity
|
// load the default homepage
|
||||||
if(!location.hash) {
|
var hp = getBookmark(0)
|
||||||
var hp = getBookmark(0)
|
loadURL(hp || 'about:kopher')
|
||||||
loadURL(hp || 'about:kopher')
|
|
||||||
}
|
|
||||||
|
|
||||||
// set external activity handling for gopher:// URLs
|
|
||||||
navigator.mozSetMessageHandler('activity', function(req) {
|
navigator.mozSetMessageHandler('activity', function(req) {
|
||||||
var act = req.source
|
var act = req.source
|
||||||
if(act.name === 'view' && act.data.type === 'url' && act.data.url)
|
if(act.name === 'view' && act.data.type === 'url' && act.data.url)
|
||||||
loadURL((''+act.data.url) || 'about:kopher')
|
loadURL((''+act.data.url) || 'about:kopher')
|
||||||
});
|
})
|
||||||
|
|
||||||
}, false)
|
}, false)
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"activities": {
|
"activities": {
|
||||||
"view": {
|
"view": {
|
||||||
"href": "/index.html#ext",
|
"href": "/index.html",
|
||||||
"disposition": "window",
|
"disposition": "window",
|
||||||
"filters": {
|
"filters": {
|
||||||
"type": "url",
|
"type": "url",
|
||||||
|
|||||||
Reference in New Issue
Block a user