Skip to content

Commit

Permalink
Fix CORS issue
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaVerou committed Feb 13, 2024
1 parent e7cf637 commit f82d0c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/prism-live.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@

import("./prism-live.mjs").then(m => Prism.Live = m.default);
{
let url = document.currentScript?.src;
url = new URL(url, location);
let importURL = new URL("./prism-live.mjs", url);
importURL.search = url.search;
import(importURL).then(m => Prism.Live = m.default);
}

0 comments on commit f82d0c7

Please sign in to comment.