Commit bcfb5ef5 authored by Siong-Ui Te's avatar Siong-Ui Te

use common frontend lib

parent 46f44067
......@@ -269,6 +269,7 @@ lib_pali:
go get -u github.com/siongui/gopaliwordvfs
go get -u github.com/siongui/gopalilib/libfrontend/velthuis
go get -u github.com/siongui/gopalilib/libfrontend/setting
go get -u github.com/siongui/gopalilib/libfrontend
lib_gtmpl:
@echo "\033[92mInstalling Go html/template with gettext support ...\033[0m"
......
package main
func HttpWordJsonPath(word string) string {
if isOffline() {
return "/json/" + word + ".json"
}
return "https://siongui.github.io/xemaauj9k5qn34x88m4h/" + word + ".json"
//return "/xemaauj9k5qn34x88m4h/" + word + ".json"
}
......@@ -4,6 +4,7 @@ import (
. "github.com/siongui/godom"
"github.com/siongui/gopalilib/lib"
"github.com/siongui/gopalilib/lib/dicmgr"
"github.com/siongui/gopalilib/libfrontend"
"github.com/siongui/gopalilib/libfrontend/setting"
sg "github.com/siongui/gopherjs-input-suggest"
)
......@@ -20,7 +21,7 @@ func setWordPreviewUI(word, rawhtml string) {
}
func httpGetWordJson2(word string) {
wi, err := lib.HttpGetWordJson(HttpWordJsonPath(word))
wi, err := lib.HttpGetWordJson(libfrontend.HttpWordJsonPath(word))
if err != nil {
return
}
......
......@@ -5,6 +5,7 @@ import (
"github.com/siongui/gopalilib/lib"
"github.com/siongui/gopalilib/lib/dicmgr"
dic "github.com/siongui/gopalilib/lib/dictionary"
"github.com/siongui/gopalilib/libfrontend"
"github.com/siongui/gopalilib/libfrontend/setting"
)
......@@ -22,7 +23,7 @@ func httpGetWordJson(w string, changeUrl bool) {
showLookingUp()
defer hideLookingUp()
wi, err := lib.HttpGetWordJson(HttpWordJsonPath(w))
wi, err := lib.HttpGetWordJson(libfrontend.HttpWordJsonPath(w))
if err != nil {
mainContent.Set("textContent", err.Error())
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment