Skip to content

Commit 7757629

Browse files
committed
Fix documentation links and add typos report links to Suggestion Quality badges
- Changed documentation links to use absolute URLs (/ + repo.name + /) instead of relative URLs to fix incorrect paths from /proof/spelling/ - Added clickable links to Suggestion Quality badges pointing to /{repo}/typosreport/ for detailed test results - Fixed in both addSpellerLi() and addSpellerTR() functions
1 parent 3df0d08 commit 7757629

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

assets/js/spellertable.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
function addSpellerLi(repo) {
99
const li = document.createElement('li')
10-
li.appendChild(addr(reponame2langname(repo.name), repo.name + '/'))
10+
li.appendChild(addr(reponame2langname(repo.name), '/' + repo.name + '/'))
1111
li.appendChild(document.createTextNode(' '))
1212
li.appendChild(addr('(source)', repo.html_url))
1313

@@ -155,13 +155,16 @@ function addSpellerRepoTable(repos, mainFilter, filters) {
155155

156156
function addSpellerSuggQuality(repo) {
157157
let row_sugg = document.createElement('td');
158+
const sugg_link = document.createElement('a');
159+
sugg_link.setAttribute('href', '/' + repo.name + '/typosreport/');
158160
const sugg_image = document.createElement('img');
159161
sugg_image.setAttribute(
160162
'src',
161163
'https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fgiellalt%2F' + repo.name + '%2Fgh-pages%2Fspellersuggs.json&label=S'
162164
);
163165
sugg_image.setAttribute('alt', 'Suggestion Quality');
164-
row_sugg.appendChild(sugg_image);
166+
sugg_link.appendChild(sugg_image);
167+
row_sugg.appendChild(sugg_link);
165168
return row_sugg;
166169
}
167170

@@ -181,7 +184,7 @@ function addSpellerTR(repo) {
181184
let row = document.createElement('tr');
182185

183186
let row_lang = document.createElement('td');
184-
row_lang.appendChild(addr(reponame2langname(repo.name), repo.name + '/'));
187+
row_lang.appendChild(addr(reponame2langname(repo.name), '/' + repo.name + '/'));
185188

186189
row.appendChild(row_lang);
187190
row.appendChild(addRepo(repo));

0 commit comments

Comments
 (0)