mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +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');
|
tier_div.classList.add('tier-list-row', index % 2 ? 'odd' : 'even');
|
||||||
|
|
||||||
let element = document.createElement('div');
|
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');
|
element.classList.add('tier-list-tracker');
|
||||||
setTextContent(
|
setTextContent(element, `${site} - tier ${tracker.tier + 1}`);
|
||||||
element,
|
|
||||||
`${tracker.sitename || tracker.host || tracker.announce} - tier ${
|
|
||||||
tracker.tier + 1
|
|
||||||
}`
|
|
||||||
);
|
|
||||||
element.setAttribute('title', tracker.announce);
|
element.setAttribute('title', tracker.announce);
|
||||||
tier_div.append(element);
|
tier_div.append(element);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue