Comments (3)
对于搜索 url 可以替换下面
- 搜狗 url: "https://www.sogou.com/web?query="
- 谷歌 url: "https://www.google.com/search?q="
对应的 img url 需要获取搜索引擎的
from webstack-go.
改了还是不行。而且我看到你代码有想实现保存功能,但是不完整。 var localSearchData = localStorage.getItem("searchData");
if (localSearchData && (searchData.custom === localSearchData.custom)) {
searchData = JSON.parse(localSearchData)
}
from webstack-go.
改了还是不行。但是我看到你的代码有想实现保存功能,不完整。 var localSearchData = localStorage.getItem("searchData"); if (localSearchData && (searchData.custom === localSearchData.custom)) { searchData = JSON.parse(localSearchData) }
很抱歉回复这么晚, 大体看了下如果要实现自定义搜索可以修改此处 script userDefinedSearchData 。对于实现客户端cookie保持功能可能暂时无法实现
复制下面代码
<script>
var userDefinedSearchData = {
"custom": true,
"thisSearch": "https://www.google.com/search?q=",
"thisSearchIcon": "url(https://www.google.com/favicon.ico)",
"hotStatus": true,
"data": [
{"name": "谷歌", "img": "url(https://www.google.com/favicon.ico)", "url": "https://www.google.com/search?q="},
{"name": "搜狗", "img": "url(https://www.sogou.com/favicon.ico)", "url": "https://www.sogou.com/web?query="},
]
};
</script>
userDefinedSearchData 自定义搜索引擎
- custom: 是否启用自定义配置
- thisSearch: 当前搜索引擎的搜索链接
- thisSearchIcon: 当前搜索引擎的图标链接,格式为url(图片链接)
- hotStatus: 是否启用搜热词功能
- data: 多搜索引擎配置
from webstack-go.
Related Issues (20)
- 删除webstack-go-service容器,重新启动会报错 HOT 7
- 启动问题 HOT 2
- docker部署报错 HOT 2
- go mod tidy 时 appdash-data?go-get=1: 404 Not Found
- 能否直接将项目发布到dockerhub HOT 2
- 项目初始化失败 HOT 1
- docker 删掉 port 使用 host 模式安装,初始化地址填 127.0.0.1 ,显示初始化成功,但重启之后无法访问 HOT 1
- 如何开启子路径的方式访问呢,比如:http://ip:port/subpath呢 HOT 4
- Debian12下使用docker部署报错
- docker部署如何修改基本信息 HOT 7
- [建议] 将一些设置在代码里的参数,改成可配置参数
- 请问能否支持本地数据库
- 请问是否能发布二进制文件在releases内 HOT 2
- 疑似项目在数据库连接方面,没有完全设计好 HOT 5
- 如何清理默认生成的网站,我想写一些自己的网站 HOT 2
- 主页内有什么方式可以自定义一些东西吗 HOT 2
- PC浏览器打开后台时候不显示菜单 HOT 1
- 本地编译及容器编译时graphql发生错误,提示cannot use err (variable of type error) as *gqlerror.Error value in argument to errcode.Set: need type assertion HOT 1
- 好家伙,我最近还在想要不要自己手动撸上一个导航的 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webstack-go.