diff options
author | Teddy Wing | 2020-03-22 15:30:25 +0100 |
---|---|---|
committer | Teddy Wing | 2020-03-22 15:31:35 +0100 |
commit | bc85d500242705162467af0b5cd0f7cf355e2f7a (patch) | |
tree | 2b7373342fda965ea62b0c6553ef18aee038dfc2 /godoc-links.user.js | |
parent | 9451a0e91de5248b2bce1626bab8c9189a3a72d4 (diff) | |
download | godoc-links-bc85d500242705162467af0b5cd0f7cf355e2f7a.tar.bz2 |
github.com: Check if a repo uses Go
Look in the language stats percentage bar on the repo page to find out
if the project uses Go.
Diffstat (limited to 'godoc-links.user.js')
-rw-r--r-- | godoc-links.user.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/godoc-links.user.js b/godoc-links.user.js index 52f2596..de1fed6 100644 --- a/godoc-links.user.js +++ b/godoc-links.user.js @@ -12,3 +12,15 @@ function pkg_go_dev () { parent_el.removeChild(import_path_el); parent_el.prepend(link_el); } + + +function github () { + var languages = document.querySelectorAll('.repository-lang-stats-numbers .lang'); + + for (var i = 0; i < languages.length; i++) { + if (languages[i].textContent === 'Go') { + console.log('found'); + break; + } + } +} |