Cookie Clicker Wiki
Advertisement

[code goes here]

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:CollapsibleCode!/doc to edit this documentation. (How does this work?)

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...

Code

// ==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); }

Advertisement