1
0
mirror of https://gitee.com/bitdance-team/chrome-extension synced 2025-10-08 00:45:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

添加学术论文搜索模式;补充已有搜索模式搜索推荐;omnibox匹配关键字时不再区分大小写

This commit is contained in:
2022-02-05 17:44:43 +08:00
parent 747350ecb7
commit 06d270363a
5 changed files with 184 additions and 32 deletions

View File

@@ -20,8 +20,8 @@ $.extend({
window.onload = () => {
let transText = $.getUrlVar('__bitdance_extension__');
if (!transText || transText.trim() == "") return
// alert(transText)
console.log("[BitDance extension] 学生助手插件 - 有道翻译自动填入模块 - 翻译文本为:", transText);
document.getElementsByTagName("textarea")[0].value = decodeURIComponent(transText)
document.getElementById("transMachine").click()

View File

@@ -0,0 +1,27 @@
console.log("[BitDance extension] 学生助手插件 - 维普期刊自动搜索模块加载成功");
// refer: https://www.cnblogs.com/chen-lhx/p/5198612.html
$.extend({
getUrlVars: function () {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
},
getUrlVar: function (name) {
return $.getUrlVars()[name];
}
});
window.onload = () => {
let transText = $.getUrlVar('__bitdance_extension__');
if (!transText || transText.trim() == "") return
console.log("[BitDance extension] 学生助手插件 - 维普期刊自动搜索模块 - 模块文本为:", transText);
document.getElementById("searchKeywords").value = decodeURIComponent(transText)
document.getElementById("btnSearch").click()
}

View File

@@ -0,0 +1,27 @@
console.log("[BitDance extension] 学生助手插件 - 中国知网自动搜索模块加载成功");
// refer: https://www.cnblogs.com/chen-lhx/p/5198612.html
$.extend({
getUrlVars: function () {
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
},
getUrlVar: function (name) {
return $.getUrlVars()[name];
}
});
window.onload = () => {
let transText = $.getUrlVar('__bitdance_extension__');
if (!transText || transText.trim() == "") return
console.log("[BitDance extension] 学生助手插件 - 中国知网自动搜索模块 - 模块文本为:", transText);
document.getElementById("txt_SearchText").value = decodeURIComponent(transText)
document.querySelector(".search-btn").click()
}