Template:CollapsibleCode!/doc
Description
This template is used to create a collapsible code section, along with Template:!CollapsibleCode
Syntax
Use {{!CollapsibleCode}}
at the beginning of the code and {{CollapsibleCode!}}
at the end of the code.
Example
{{!CollapsibleCode}}// ==UserScript==
// @name CheatInterface
// @namespace Cookie
// @include orteil.dashnet.org/cookieclicker/
// @version 1
// @grant none
// ==/UserScript==
var oldOnload = window.onload;
window.onload = function () {
oldOnload();
var script = document.createElement('script');
script.setAttribute('src', 'http://example.net/');
document.body.appendChild(script);
}{{CollapsibleCode!}}
results in...
// ==UserScript== // @name CheatInterface // @namespace Cookie // @include orteil.dashnet.org/cookieclicker/ // @version 1 // @grant none // ==/UserScript== var oldOnload = window.onload; window.onload = function () { oldOnload(); var script = document.createElement('script'); script.setAttribute('src', 'http://example.net/'); document.body.appendChild(script); }