Skip to content

Commit

Permalink
Add support for __RELATIVEFILE__ (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
pehbehbeh committed Jul 18, 2024
1 parent bbc6262 commit e9160bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion priv/static/phoenix_live_reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ class LiveReloader {
this.channel.push("full_path", {rel_path: file, app: app})
.receive("ok", ({full_path}) => {
console.log("full path", full_path)
let url = this.editorURL.replace("__FILE__", full_path).replace("__LINE__", line)
let url = this.editorURL
.replace("__RELATIVEFILE__", file)
.replace("__FILE__", full_path)
.replace("__LINE__", line)
window.open(url, "_self")
})
.receive("error", reason => console.error("failed to resolve full path", reason))
Expand Down

0 comments on commit e9160bd

Please sign in to comment.