mirror of
https://github.com/open-webui/extension
synced 2025-06-26 18:25:58 +00:00
refac
This commit is contained in:
parent
e53bcb5202
commit
1771161859
@ -1,10 +1,10 @@
|
||||
chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
|
||||
// read changeInfo data and do something with it (like read the url)
|
||||
if (changeInfo.url) {
|
||||
// do something here
|
||||
chrome.tabs.sendMessage(tabId, {
|
||||
message: "urlChange",
|
||||
url: changeInfo.url,
|
||||
});
|
||||
}
|
||||
});
|
||||
// chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
|
||||
// // read changeInfo data and do something with it (like read the url)
|
||||
// if (changeInfo.url) {
|
||||
// // do something here
|
||||
// chrome.tabs.sendMessage(tabId, {
|
||||
// message: "urlChange",
|
||||
// url: changeInfo.url,
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
@ -15,7 +15,13 @@ export const SpotlightSearch = () => {
|
||||
e.preventDefault();
|
||||
setOpen((open) => !open);
|
||||
setTimeout(() => {
|
||||
document.getElementById("open-webui-search-input").focus();
|
||||
const inputElement = document.getElementById(
|
||||
"open-webui-search-input"
|
||||
);
|
||||
|
||||
if (inputElement) {
|
||||
inputElement.focus();
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user