User:JJPMaster/widgets
Jump to navigation
Jump to search
Widgets is a script that allows you to embed client-side JavaScript into Uncyclopedia pages. The code will however only run for other people using the script.
Think before installing this script, because it may pose a major security risk.
Features[edit | edit source]
This script allows you to embed JavaScript, but it also has two other things to note:
- It comes pre-installed with jQuery, assuming that the default JavaScript doesn't already come with it.
- It literally allows you to create entire neural networks and machine learning models within Uncyclopedia. Why, you may ask? I don't even know.
- It's only n lines of code, so you can easily steal it for your own wikis!
How do I get it?[edit | edit source]
Just add the following to User:<insert name here>/common.js:
mw.loader.load('//en.uncyclopedia.co/w/index.php?title=User:JJPMaster/widgets.js&action=raw&ctype=text/javascript');
How do I use it?[edit | edit source]
Go to a page, like User:JJPMaster/sandbox, and create a div with the class of "script", like <div class="script">
, and then add JS between that and the closing tag. Alternatively, src
, html
, module
, nolib
, and embed
are a few other div classes you can use, and they do the following:
src
- Defines the src attribute in<script>
if you want to embed other scripts, like how RedWarn is forcibly loaded for all Widgets users on User:JJPMaster/sandboxhtml
- Allows you to embed HTML beyond<script>
module
- Same asscript
, except it addstype=module
nolib
- Same asscript
, but it doesn't load any librariesembed
- Allows you to embed anything in your pagetensorflow
- The class you need if you want to do machine learning stuff