Skip to content

Commit a315e88

Browse files
authored
Merge branch 'master' into patch-2
2 parents 2fa7fee + 5cb0f70 commit a315e88

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

examples/index.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@
2121
</markdown-toolbar>
2222
<textarea rows="6" class="mt-3 d-block width-full" id="textarea"></textarea>
2323
</div>
24-
<!-- script src="../dist/index.umd.js"></script -->
25-
<script src="https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.umd.js"></script>
24+
<script>
25+
const script = document.createElement('script')
26+
if (window.location.hostname.endsWith('github.io')) {
27+
script.src = "https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.umd.js"
28+
} else {
29+
script.src = "../dist/index.umd.js"
30+
}
31+
document.body.appendChild(script)
32+
</script>
2633
</body>
2734
</html>

0 commit comments

Comments
 (0)