Skip to content

Commit

Permalink
fix: detect more 'no items' overlay types
Browse files Browse the repository at this point in the history
fixes #2
  • Loading branch information
pl4nty committed Oct 2, 2022
1 parent a50f2e3 commit c436f83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion content.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ fetch(chrome.runtime.getURL('msportalfx-svg.css')).then(res => res.text()).then(
function loadIcon() {
let refIcon = document.querySelector(".fxs-blade-header-icon use") // header
|| document.querySelector(".fxc-gcflink-icon use") // table row - some don't have icons eg Subscriptions
|| document.querySelector(".ext-overlay-image svg use") // optional overlay for table with no rows
|| document.querySelector(".ext-hubs-artbrowse-emptyicon svg use") // optional overlays for table with no rows
|| document.querySelector(".ext-hubs-browse-emptyicon svg use") // as above
|| document.querySelector(".ext-overlay-image svg use") // as above
|| [...document.querySelectorAll('.fxs-portal-activated use')].pop() // blade without header eg Properties

if (refIcon) {
Expand Down

0 comments on commit c436f83

Please sign in to comment.