Skip to content

Commit

Permalink
prevent links from downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp committed Sep 15, 2021
1 parent d1aecb4 commit e4f19ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/babel-plugin-open-source/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ if (typeof document !== 'undefined') {
if (!event.target.dataset.source) return;
if (!event.altKey) return;

event.preventDefault();
const { filename, start } = JSON.parse(event.target.dataset.source)
window.open('vscode://file' + filename + ':' + start)
})
Expand Down

0 comments on commit e4f19ae

Please sign in to comment.