mirror of
https://github.com/transmission/transmission
synced 2025-01-31 11:23:40 +00:00
(trunk, web) #5620 'Inspector - Clickable urls in Comment field' -- added with patch by e-moe, thanks also to cfpp2p for testing
This commit is contained in:
parent
e02b244300
commit
157bbe73f6
1 changed files with 8 additions and 1 deletions
|
@ -106,6 +106,7 @@ function Inspector(controller) {
|
|||
creator, mixed_creator,
|
||||
date, mixed_date,
|
||||
v, u, f, d, pct,
|
||||
uri,
|
||||
now = Date.now();
|
||||
|
||||
//
|
||||
|
@ -396,7 +397,13 @@ function Inspector(controller) {
|
|||
}
|
||||
if(!str)
|
||||
str = none;
|
||||
setTextContent(e.comment_lb, str);
|
||||
uri = parseUri(str);
|
||||
if (uri.protocol == 'http' || uri.parseUri == 'https') {
|
||||
str = encodeURI(str);
|
||||
setInnerHTML(e.comment_lb, '<a href="' + str + '" target="_blank" >' + str + '</a>');
|
||||
}
|
||||
else
|
||||
setTextContent(e.comment_lb, str);
|
||||
|
||||
//
|
||||
// origin
|
||||
|
|
Loading…
Reference in a new issue