mirror of
https://github.com/KoriIku/luxirty-search
synced 2024-11-22 00:28:00 +00:00
Merge pull request #16 from imyzt/main
pref:Set search title, easier to recognize in multiple tabs
This commit is contained in:
commit
344ad4409e
@ -32,6 +32,10 @@ export default {
|
||||
script.async = true;
|
||||
document.head.appendChild(script);
|
||||
},
|
||||
setTitle() {
|
||||
var inputContent = document.getElementsByName('search')[0].value;
|
||||
document.title = inputContent + ' - Luxirty Search'
|
||||
},
|
||||
goHome() {
|
||||
// 使用 window.location.href 跳转到根路径
|
||||
window.location.href = '/';
|
||||
@ -46,6 +50,9 @@ export default {
|
||||
anchor.removeAttribute('data-cturl');
|
||||
anchor.removeAttribute('data-ctorig');
|
||||
});
|
||||
|
||||
// 设置搜索标题,多页签时更好切换
|
||||
this.setTitle();
|
||||
};
|
||||
|
||||
// 将回调注册到 Google Custom Search 引擎对象
|
||||
|
Loading…
Reference in New Issue
Block a user