Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify which search results point to webpkgcache #5

Open
twifkak opened this issue Feb 18, 2022 · 4 comments
Open

Identify which search results point to webpkgcache #5

twifkak opened this issue Feb 18, 2022 · 4 comments

Comments

@twifkak
Copy link
Collaborator

twifkak commented Feb 18, 2022

When on a google.TLD search results page, if a user clicks the extension icon, it could identify which results point to webpkgcache (e.g. with an emoji or text badge).

@Gregable
Copy link

I could emulate this slightly by pasting the following into the dev console:

var styleSheet = document.createElement("style");
styleSheet.innerText = "a[data-sxg-url] { background-color: red; }";
document.head.appendChild(styleSheet);

You could probably do better visually than primary colors, and it only highlights the link, not the whole result block. The latter would take slightly more than just css.

@twifkak
Copy link
Collaborator Author

twifkak commented Feb 19, 2022

Clever to use CSS. Also possible is something like this, though it may be too coupled to Google's current HTML template:

a[data-sxg-url] > div[role=heading] > div[role=link]::before {
    content: "📦 ";
}

@Gregable
Copy link

may be too coupled to Google's current HTML template

I'd not be too worried about this. If you can find a way to make it less coupled without added effort, that's cool, but the worst case it's back to where we are today.

@twifkak
Copy link
Collaborator Author

twifkak commented Feb 24, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants