├── images └── arrow.cur ├── README.md ├── LICENSE ├── common.js ├── index.html └── search.html /images/arrow.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iHunterDev/helpYouSearch/main/images/arrow.cur -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # helpYouSearch 2 | 3 | > 一个帮助伸手党搜索的好工具 4 | > 5 | > 关键词: `帮你搜索` `帮你百度` `让我来帮你百度一下` 6 | 7 | 8 | 9 | ## 安装 10 | 11 | 纯静态上传即可 12 | 13 | 支持子目录部署 14 | 15 | 16 | 17 | ## 注意事项 18 | 19 | 本项目开源并且免费,但是禁止删除页尾的版权信息,导航中的允许删除。 20 | 21 | 22 | 23 | ## 关于 24 | 25 | - 作者博客:https://blog.wz52.cn 26 | - 邮箱:wcgcodes@gmail.com 27 | - 提交 BUG 或建议请使用 issues -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 WZBLOG 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /common.js: -------------------------------------------------------------------------------- 1 | const CONFIG = { 2 | runPath: location.protocol + '//' + location.host + location.pathname + 'index.html', 3 | jumpPage: location.protocol + '//' + location.host + location.pathname + 'search.html?goto=%s&query=%s', 4 | engine: { 5 | /** 6 | * 用“%s”代替搜索字词 7 | */ 8 | 9 | // 百度 10 | baidu: 'https://www.baidu.com/s?wd=%s', 11 | 12 | // 必应 13 | bing: 'https://www.bing.com/search?q=%s', 14 | 15 | // 谷歌 16 | google: 'https://www.google.com/search?q=%s', 17 | 18 | // 搜狗 19 | sogou: 'https://www.sogou.com/web?query=%s', 20 | 21 | // 360 22 | '360': 'https://www.so.com/s?q=%s', 23 | }, 24 | }; 25 | 26 | 27 | // 在原型链中添加一个函数 28 | String.prototype.format = function() { 29 | var newStr = this, i = 0; 30 | while (/%s/.test(newStr)) 31 | newStr = newStr.replace("%s", arguments[i++]) 32 | 33 | return newStr; 34 | } 35 | 36 | 37 | /** 38 | * 获取url中只有一个参数的参数值] 39 | * @return {[string]} [参数值] 40 | */ 41 | function getParam(name) { 42 | // 获取查询字符串 43 | var querystring = location.search; 44 | 45 | // 删除 第一个问号 46 | querystring = querystring.substr(1); 47 | 48 | // 切割参数 49 | var param_items = querystring.split('&'); 50 | 51 | // 定义保存参数的对象 52 | var params = {}; 53 | 54 | // 切割名字与值 55 | for (var i = 0; i < param_items.length; i++) { 56 | 57 | var key_val = param_items[i].split('='); 58 | 59 | var k = key_val[0]; 60 | var v = key_val[1]; 61 | 62 | // 添加到保存对象中 63 | params[k] = decodeURI(v); 64 | 65 | } 66 | return params[name] || null; 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |