This commit is contained in:
Timothy J. Baek 2024-05-22 22:07:22 -07:00
parent e53bcb5202
commit 1771161859
2 changed files with 17 additions and 11 deletions

View File

@ -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,
// });
// }
// });

View File

@ -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);
}