Skip to content

Commit

Permalink
updated screenshots, add oninstall event for extension, fixed visible…
Browse files Browse the repository at this point in the history
… items when on non-beta - ms
  • Loading branch information
mlsof21 committed Sep 19, 2022
1 parent 63a03ae commit 7e4a4e7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Binary file modified screenshots/screenshot_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/screenshot_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/ts/background.ts
Expand Up @@ -18,6 +18,10 @@ chrome.runtime.onMessage.addListener((data: any) => {
}
});

chrome.runtime.onInstalled.addListener(() => {
openOptionsPage();
});

async function openOptionsPage() {
const [optionsTab] = await chrome.tabs.query({
url: `chrome-extension://${chrome.runtime.id}\/html\/options.html`,
Expand Down
4 changes: 2 additions & 2 deletions src/ts/common.ts
Expand Up @@ -40,8 +40,8 @@ export function waitForSearchToUpdate(

export function getVisibleItems(items: NodeListOf<Element> | undefined = undefined): Element[] {
if (!items) items = document.querySelectorAll('div.item');
const result: Element[] = Array.from(items).filter((item) => !item.className.includes('searchHidden'));

// const result: Element[] = Array.from(items).filter((item) => !item.className.includes('searchHidden'));
const result = Array.from(items).filter((item) => parseFloat(window.getComputedStyle(item).opacity) > 0.5);
return result;
}

Expand Down

0 comments on commit 7e4a4e7

Please sign in to comment.