MediaWiki:Common.js

From Reuse
Jump to navigationJump to search

Note: After publishing, 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 / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
<script language="JavaScript" type="text/javascript">
// This script was supplied free by Hypergurl
// http://www.hypergurl.com
<!--
    // JavaScript to interpolate random change into a page.
    var A = 29;  // Number of alternative changes
    var B = 29;  // Number of alternative changes
    var change = new Array(A);  // Array to hold filenames
    var object = new Array(B);  // Array to hold filenames

change[0] = "rewrite"; 
change[1] = "smash";
change[2] = "revolve";
change[3] = "shift";
change[4] = "reject";
change[5] = "refuse";
change[6] = "revert";
change[7] = "reform";
change[8] = "reconsider";
change[9] = "shuffle";
change[10] = "remove";
change[11] = "re-open";
change[12] = "vary";
change[13] = "shake";
change[14] = "disrupt";
change[15] = "dismantle";
change[16] = "connect";
change[17] = "invert";
change[18] = "subvert";
change[19] = "accept";
change[20] = "sabotage";
change[21] = "embrace";
change[22] = "organize";
change[23] = "turn";
change[24] = "reveal";
change[25] = "cloak";
change[26] = "forget";
change[27] = "re-use";
change[28] = "break";
change[29] = "uncover";

object[0] = "people"; 
object[1] = "order";
object[2] = "cities";
object[3] = "circumstances";
object[4] = "hypocrisy";
object[5] = "madness";
object[6] = "nations";
object[7] = "struggle";
object[8] = "injustice";
object[9] = "education";
object[10] = "thought";
object[11] = "revolution";
object[12] = "insecurity";
object[13] = "dreams";
object[14] = "memory";
object[15] = "speech";
object[16] = "destiny";
object[17] = "reality";
object[18] = "present ";
object[19] = "life";
object[20] = "world";
object[21] = "politics";
object[22] = "greed";
object[23] = "America";
object[24] = "words";
object[25] = "democracy";
object[26] = "security";
object[27] = "history";
object[28] = "opinion";
object[29] = "desire";

function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}
var choice = pickRandom(A);
var choice2 = pickRandom(B);

// -->
</script>