mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
fix: show announce url origin in inspector tier list (#5382)
This commit is contained in:
parent
c3038d8ed7
commit
8dbf40613a
1 changed files with 7 additions and 6 deletions
|
@ -739,13 +739,14 @@ export class Inspector extends EventTarget {
|
|||
tier_div.classList.add('tier-list-row', index % 2 ? 'odd' : 'even');
|
||||
|
||||
let element = document.createElement('div');
|
||||
let site = '';
|
||||
try {
|
||||
site = new URL(tracker.announce).origin;
|
||||
} catch {
|
||||
site = [tracker.sitename || tracker.host || tracker.announce];
|
||||
}
|
||||
element.classList.add('tier-list-tracker');
|
||||
setTextContent(
|
||||
element,
|
||||
`${tracker.sitename || tracker.host || tracker.announce} - tier ${
|
||||
tracker.tier + 1
|
||||
}`
|
||||
);
|
||||
setTextContent(element, `${site} - tier ${tracker.tier + 1}`);
|
||||
element.setAttribute('title', tracker.announce);
|
||||
tier_div.append(element);
|
||||
|
||||
|
|
Loading…
Reference in a new issue