RationalWiki's 2019 Fundraiser

There is no RationalWiki without you. We are a small non-profit with no staff – we are hundreds of volunteers who document pseudoscience and crankery around the world every day. We will never allow ads because we must remain independent. We cannot rely on big donors with corresponding big agendas. We are not the largest website around, but we believe we play an important role in defending truth and objectivity.

If everyone who saw this today donated $5, we would meet our goal for 2019.

Fighting pseudoscience isn't free.
We are 100% user-supported! Help and donate $5, $20 or whatever you can today with PayPal Logo.png!

Donations so far: $6000Goal: $6000

User:Nx/Scripts/RandomAny.js

From RationalWiki
Jump to: navigation, search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
if (typeof randomanyindent == 'undefined') randomanyindent = false;
if (typeof randomanyns == 'undefined') {
  // Format is: { <namespacenumber> : [<url escaped namespace name>, <name that appears in toolbar>, <name that appears in tooltip>  ] }
  randomanyns = { 106 : ['Fun', 'Fun', 'Fun'], 
                  107: ['Fun' , 'Fun', 'Fun'] ,
                  2 : ['User_talk', 'talk', 'User talk'],
                }
}

function randomany() {
  if (n_randompage = document.getElementById('n-randompage')) {
    if ( typeof randomanyns[wgNamespaceNumber] != 'undefined') {
      n_randomany = document.createElement('li');
      n_randomany.id = "n-randomany";
      n_randomany.innerHTML = "<a"+' href="/wiki/Special:Random/' + randomanyns[wgNamespaceNumber][0] + 
                                '" title="Load a random page from ' + randomanyns[wgNamespaceNumber][2] + ' namespace">' + 
                                  'Random ' + randomanyns[wgNamespaceNumber][1] + ' page</a>';
      if (randomanyindent) {
        n_randomanyul = document.createElement('ul');
        n_randomanyul.appendChild(n_randomany);
        n_randomany = n_randomanyul;
      }
      n_randompage.parentNode.insertBefore(n_randomany,n_randompage.nextSibling);
    }
  }
}

addOnloadHook(randomany)