MediaWiki:Common.js/Notice.js

/* Any JavaScript here will be loaded for all users on every page load. */ var siteNoticeID = "1.33"; var siteNoticeValue = "\x3cdiv id=\"localNotice\" lang=\"en\" dir=\"ltr\"\x3e\x3cp\x3eThe latest chapter for \x3ca href=\"http://www.fujimishobo.co.jp/beyond/lineup/slash.php\"\x3eSlashDog\x3c/a\x3e is already out!\x3cbr \x3e\nCheck the \x3ca href=\"/wiki/User_blog:Jopjopjop/SlashDog\"\x3eblog\x3c/a\x3e to find out what happens to \x3ca href=\"wiki/Tobio Ikuse\"\x3eTobio\x3c/a\x3e and the identity of the possessor of the \x3ca href=\"/wiki/Longinus#Absolute Demise\"\x3eLonginus Absolute Demise\x3c/a\x3e!\x3c/p\x3e\x3c/a\x3e"; if (siteNoticeValue !== "") { var cookieValue = ""; var cookieName = "dismissSiteNotice="; var cookiePos = document.cookie.indexOf(cookieName); if (cookiePos > -1) { cookiePos = cookiePos + cookieName.length; var endPos = document.cookie.indexOf(";", cookiePos); if (endPos > -1) { cookieValue = document.cookie.substring(cookiePos, endPos); } else { cookieValue = document.cookie.substring(cookiePos); } }  if (cookieValue != siteNoticeID) { function dismissNotice { var date = new Date; date.setTime(date.getTime + 30 * 86400 * 1000); document.cookie = cookieName + siteNoticeID + "; expires=" + date.toGMTString + "; path=/"; var element = document.getElementById('mw-dismissable-notice'); element.parentNode.removeChild(element); }   var notice = document.createElement("li"); notice.id = "mw-dismissable-notice"; notice.className = "plainlinks"; notice.innerHTML = siteNoticeValue; var WikiaNotif = document.getElementById("WikiaNotifications"); if (WikiaNotif) { var belowElement = WikiaNotif.getElementsByTagName("ul")[0]; WikiaNotif.insertBefore(notice, belowElement); var getNotice = document.getElementById("localNotice"); getNotice.innerHTML = '' + getNotice.innerHTML; } else { var barWrapper = document.getElementById("WikiaBarWrapper"); if (barWrapper) { var WikiaNotif = document.createElement("ul"); WikiaNotif.id = "WikiaNotifications"; WikiaNotif.className = "WikiaNotifications"; barWrapper.parentNode.insertBefore(WikiaNotif, barWrapper); WikiaNotif.appendChild(notice); var getNotice = document.getElementById("localNotice"); getNotice.innerHTML = '' + getNotice.innerHTML; }   }  } }