mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 05:24:10 +03:00
feat: add support for running jquery
This commit is contained in:
1 parent
4e783e6dc5
commit
a35a51cc05
2 files changed
+16
-2
No files matched your search
@@ -14,19 +14,20 @@ intro: |
|
||||
plugins:
|
||||
- tooltip
|
||||
- copyCode
|
||||
- runCode
|
||||
---
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Including jQuery
|
||||
|
||||
```javascript {.wrap}
|
||||
```html {.wrap}
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
```
|
||||
|
||||
#### Official CDN
|
||||
|
||||
```javascript {.wrap}
|
||||
```html {.wrap}
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.min.js" crossorigin="anonymous"></script>
|
||||
```
|
||||
|
||||
|
||||
@@ -155,6 +155,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (document.querySelector('h1').textContent.includes('jQuery')) {
|
||||
config = {
|
||||
...baseConfig,
|
||||
markup: {
|
||||
language: 'html',
|
||||
content: `<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></scr` + 'ipt>\n',
|
||||
},
|
||||
tools: {
|
||||
status: 'closed',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const plaugroundUrl = livecodes.getPlaygroundUrl({config});
|
||||
window.open(plaugroundUrl, '_blank');
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user