Difference between revisions of "MediaWiki:Common.js"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
$(function () { | $(function () { | ||
// #wip | |||
var e = document.getElementById('wip'); | var e = document.getElementById('wip'); | ||
e.style["font-size"] = "32px"; | e.style["font-size"] = "32px"; | ||
Line 7: | Line 8: | ||
e.style["text-align"] = "center"; | e.style["text-align"] = "center"; | ||
// #notice | |||
var notice = document.getElementById("notice"); | var notice = document.getElementById("notice"); | ||
notice.style["background-color"] = "rgba(255, 56, 56, .5)"; | notice.style["background-color"] = "rgba(255, 56, 56, .5)"; | ||
Line 13: | Line 15: | ||
notice.style.padding = "15px"; | notice.style.padding = "15px"; | ||
// #cde (in-line code element, use with span) | |||
var cdeArray = document.getElementsByClassName('cde'); | var cdeArray = document.getElementsByClassName('cde'); | ||
for (i = 0; i < cdeArray.length; i++) { | for (i = 0; i < cdeArray.length; i++) { |
Revision as of 01:07, 1 March 2018
// js on this page loads globally $(function () { // #wip var e = document.getElementById('wip'); e.style["font-size"] = "32px"; e.style["font-weight"] = "700"; e.style["text-align"] = "center"; // #notice var notice = document.getElementById("notice"); notice.style["background-color"] = "rgba(255, 56, 56, .5)"; notice.style["font-size"] = "28px"; notice.style.border = "1px solid rgba(255, 56, 56, 1)"; notice.style.padding = "15px"; // #cde (in-line code element, use with span) var cdeArray = document.getElementsByClassName('cde'); for (i = 0; i < cdeArray.length; i++) { cdeArray[i].style["background-color"] = "rgba(248, 249, 250, 1)"; cdeArray[i].style.border = "1px solid rgba(234, 236, 240, 1)"; cdeArray[i].style["font-family"] = "'Courier', monospace"; cdeArray[i].style.padding = "4px"; } }());