CURRENT MISSION: Conclude the 2026 soyjak.party hack page, aswell as any pages relating to it, such as the Summer 2026 Crisis page.
Update Quotecord with any relevant info. See the blackboard for more info.
Fixed some interface issues. CTRL + SHIFT + R to clear cache and see the changes. Soyoyuki (talk) 17:17, 21 August 2026 (UTC)
Help:Random objects: Difference between revisions
Created page with "__NOTOC__ == Uncached == Uncached random text changes on every page refresh. All server-side uncached <font color=#14866D face=monospace><<b>choose</b>></font> tags have been replaced with with the client-side script shown below. <pre> mw.hook('wikipage.content').add(function ($content) { $content.find('.choose-uncached').each(function () { var $container = $(this); var $options = $container.find('.choose-option'); if ($options.length === 0) return; var in..." |
m Text replacement - "{{Metapage}}" to " " |
||
| (6 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Achtung|Do NOT use the server-side <choose uncached> tag.}} | |||
== Uncached == | == Uncached == | ||
Uncached random text changes on every page refresh. All server-side uncached <font color=#14866D face=monospace><<b>choose</b>></font> tags have been replaced with with the client-side script shown below. | Uncached random text changes on every page refresh. All server-side uncached <font color=#14866D face=monospace><<b>choose</b>></font> tags have been replaced with with the client-side script shown below. | ||
| Line 22: | Line 25: | ||
=== How to use === | === How to use === | ||
Copy this text and edit it. Add as many extra options as you want. Unlike uncached text, you don't have to put everything on one line. | Copy this text and edit it. Add as many extra options as you want. Unlike uncached text, you don't have to put everything on one line. | ||
<pre><choose | <pre><choose> | ||
<option>text 1</option> | <option>text 1</option> | ||
<option>text 2</option> | <option>text 2</option> | ||
Latest revision as of 15:03, 21 August 2026
Uncached[edit source]
Uncached random text changes on every page refresh. All server-side uncached <choose> tags have been replaced with with the client-side script shown below.
mw.hook('wikipage.content').add(function ($content) {
$content.find('.choose-uncached').each(function () {
var $container = $(this);
var $options = $container.find('.choose-option');
if ($options.length === 0) return;
var index = Math.floor(Math.random() * $options.length);
$options.eq(index).show();
});
});
How to use[edit source]
Copy this text and edit it. Make sure to put all of the <span>s on one line. Add as many extra options as you want.
<span class="choose-uncached" style="display:inline-block;height: 14px;"><span class="choose-option">text 1</span><span class="choose-option">text 2</span></span>
Cached[edit source]
Cached random text only changes each time the page is saved, instead of it being on every reload.
How to use[edit source]
Copy this text and edit it. Add as many extra options as you want. Unlike uncached text, you don't have to put everything on one line.
<choose> <option>text 1</option> <option>text 2</option> </choose>
| Soyjak Wiki Guides and Policies
Guides: Policies: |

