Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/mods/github/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,10 @@ export default class GitHub extends View {
closeOverlay(props().overlay);
}

// Web links only: a PR body is anyone's markdown, and file: or app links would reach the OS.
open(url, cx) {
if (!url) return;
if (!/^https?:\/\//i.test(url)) return this.say(`Not opening ${url}: only web links open.`, cx, true);
if (this.demo) return this.say(`Demo: would open ${url}`, cx);
cx.open_url(url);
}
Expand Down