Skip to content

Commit 8ab0060

Browse files
authored
Merge branch 'master' into image-button
2 parents 4c0ba86 + 5cb0f70 commit 8ab0060

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
@@ -22,7 +22,14 @@
2222
</markdown-toolbar>
2323
<textarea rows="6" class="mt-3 d-block width-full" id="textarea"></textarea>
2424
</div>
25-
<!-- script src="../dist/index.umd.js"></script -->
26-
<script src="https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.umd.js"></script>
25+
<script>
26+
const script = document.createElement('script')
27+
if (window.location.hostname.endsWith('github.io')) {
28+
script.src = "https://unpkg.com/@github/markdown-toolbar-element@latest/dist/index.umd.js"
29+
} else {
30+
script.src = "../dist/index.umd.js"
31+
}
32+
document.body.appendChild(script)
33+
</script>
2734
</body>
2835
</html>

0 commit comments

Comments
 (0)