homerchen19 / github-file-icons

🌈 🗂 A browser extension which gives different filetypes different icons to GitHub, GitLab, gitea and gogs.
https://chrome.google.com/webstore/detail/file-icon-for-github-and/ficfmibkjjnpogdcfhfokmihanoldbfe
MIT License
1.42k stars 68 forks source link

Support for Gitea is broken #70

Open Phoenix616 opened 4 years ago

Phoenix616 commented 4 years ago

Currently the icons do not seem to work when self-hosting Gitea. Tested with Gitea Version: 1.11.0+dev-339-g54dab5a, github-file-icon v1.0.0 (fromt he chrome webstore) and Chromium Version 80.0.3977.0. (E.g. on this repo)

rafal06 commented 2 years ago

Also doesn't work on self-hosted Gitea version 1.16.8 (tested with Firefox 101.0.1 and github-file-icons 1.3.0 from addons.mozilla.org)

christopherpickering commented 2 years ago

@homerchen19 Changing content.ts default selector to

default:
      return {
        filenameSelector: 'tr > td.name > span > a',
        iconSelector: 'tr > td.name > span > span, tr > td.name > span > svg',
        host: Host.Others,
      };

seems to fix gitea. I put two selectors for the icon, as the repo linked above https://code.minebench.de/Minebench/Minequery is different than other gitea sites, such as https://gitea.artixlinux.org/packagesPython/python-pip.

Maybe there should a case specific to gitea?

wanesty commented 11 months ago

still broken, forgejo aswell