User:Nx/Scripts/RandomCP.js

if (typeof randomcpindent == 'undefined') randomcpindent = false;

function randomCP { if (n_randompage = document.getElementById('n-randompage')) { if (wgNamespaceNumber == 100 || wgNamespaceNumber == 101) { n_randomcp = document.createElement('li'); n_randomcp.id = "n-randomcp"; n_randomcp.innerHTML = "Random CP page'; if (randomcpindent) { n_randomcpul = document.createElement('ul'); n_randomcpul.appendChild(n_randomcp); n_randomcp = n_randomcpul; }     n_randompage.parentNode.insertBefore(n_randomcp,n_randompage.nextSibling); } } }

addOnloadHook(randomCP)