Libraryless. Click here for Pure Java version (5531L/34K).
// assumes jquery is used with $(...) sbool jqueryUsed(S html) { if (cic(getHTMLComments(html), "needs jquery")) true; if (!regexpFind("\\$\\s*\\(", html)) false; for (S script : allJavascriptFromHTMLIncludingEventHandlers(html)) if (jcontains(jsTok(script), "$(")) true; false; }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1031448 |
| Snippet name: | jqueryUsed - indirectly tested in test_autoLoadJQuery |
| Eternal ID of this version: | #1031448/8 |
| Text MD5: | 433c412534536ca84b7be2e2665c364a |
| Transpilation MD5: | e4cd3651a2da86a4b5e6b4a6c9b5d74f |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-23 15:55:38 |
| Source code size: | 299 bytes / 8 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 398 / 547 |
| Version history: | 7 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1031455 - jqueryLoaded #1031617 - reconnectingWebSocketsLoadedInHTML |