Difference between revisions of "MediaWiki:Common.js"

From 33C3_Public_Wiki
Jump to: navigation, search
(Created page with "* assings congress date information to body tag *: function setupCalendar() { var bodyTag = null; try { bodyTag = document.getElementsByTagName("body")[0]; body...")
 
 
Line 4: Line 4:
 
   try {
 
   try {
 
     bodyTag = document.getElementsByTagName("body")[0];
 
     bodyTag = document.getElementsByTagName("body")[0];
     bodyTag.year = 2015;
+
     bodyTag.year = 2016;
 
     bodyTag.month = 12;
 
     bodyTag.month = 12;
 
     bodyTag.days = [27, 28, 29, 30];
 
     bodyTag.days = [27, 28, 29, 30];

Latest revision as of 21:00, 21 November 2016

/** assings congress date information to body tag **/
function setupCalendar() {
  var bodyTag = null;
  try {
    bodyTag = document.getElementsByTagName("body")[0];
    bodyTag.year = 2016;
    bodyTag.month = 12;
    bodyTag.days = [27, 28, 29, 30];
    return bodyTag;
  } catch(e) {
    return null;
  }
}

console.log("setup calendar dates");
var body = setupCalendar();