We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2fa7fee + 5cb0f70 commit a315e88Copy full SHA for a315e88
examples/index.html
@@ -21,7 +21,14 @@
21
</markdown-toolbar>
22
<textarea rows="6" class="mt-3 d-block width-full" id="textarea"></textarea>
23
</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>
+ <script>
+ 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>
33
</body>
34
</html>
0 commit comments