Merge pull request #16 from imyzt/main

pref:Set search title, easier to recognize in multiple tabs
This commit is contained in:
KoriIku 2024-10-10 00:43:44 +08:00 committed by GitHub
commit 344ad4409e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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