feat: add support for running jquery

This commit is contained in:
Hatem Hosny committed 2025-01-05 02:15:58 +02:00
1 parent 4e783e6dc5
commit a35a51cc05
2 files changed
+16 -2

No files matched your search

+3 -2
View File
@@ -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>
```
+13
View File
@@ -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');
});