Skip to content

Commit 79d1293

Browse files
committed
Convert URLs in Sync output UI into clickable links
1 parent b6eb0ba commit 79d1293

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Fetch diff output uses correct remote branch (#509)
2424
- Properly handle more cases of truncated filenames from git pull (#511)
2525
- Made git-source-control backwards compatible with IRIS 2021.1 (#513)
26+
- Fix to convert URLs in Sync output UI into clickable links (#497)
2627

2728
## [2.5.0] - 2024-09-24
2829

csp/sync.csp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,15 @@
147147
&js<
148148
var outputContainer = document.getElementById('outputBox');
149149
var lineText = #(..QuoteJS(escapedLine))#;
150+
var lineTextAsArr = lineText.split(" ");
151+
lineTextAsArr = lineTextAsArr.map(function(text){
152+
if (text.substring(0,8) === "https://") {
153+
return '<a href="' + text + '" target="_blank">' + text + '</a>';
154+
} else {
155+
return text;
156+
}
157+
});
158+
lineText = lineTextAsArr.join(" ")
150159
var lineTextNode = document.createTextNode(lineText);
151160
outputContainer.innerHTML += lineText + "<br>";
152161
>

0 commit comments

Comments
 (0)