User:Documentalist/common.js

/*Ruler--- 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890

/*Object Browser.*/ //importArticle({type: "script", article:"User:Documentalist/Objects.js"}); //importArticle({type: "script", article:"User:Documentalist/ObjectBrowser.js"}); /***************************************************************************************** Style Guard var Id = document.createAttribute("id"); Id.value = "StyleGuard";

var Title = document.createElement("H2"); Title.appendChild(document.createTextNode("Style Guard"));

var StyleGuard = document.createElement("DIV"); StyleGuard.style.position = "relative"; StyleGuard.style.cssFloat = "right"; StyleGuard.style.width = "15%"; StyleGuard.style.height = "auto"; StyleGuard.style.minHeight = "50px"; StyleGuard.style.backgroundColor = "black"; StyleGuard.setAttributeNode(Id); StyleGuard.appendChild(Title);

var WikiaPage = document.getElementById("WikiaPage"); WikiaPage.style.marginLeft = "0px"; WikiaPage.style.width = "90%"; WikiaPage.style.maxWidth = "1600px"; WikiaPage.parentNode.insertBefore(StyleGuard, WikiaPage); /* Rule: Every WikiaPage shall have a category. function CheckRule { var Categories = document.getElementById("WikiaArticleCategories"); var Success = (Categories != null); var Message; if (Success) { Message = "&#x2714; This page has at least one category."; } else { Message = "&#x2718; This page has no category."; } var Error = document.createElement("DIV"); Error.style.position = "relative"; Error.style.width = "100%"; Error.appendChild(document.createTextNode(Message)); StyleGuard.appendChild(Error); return Success; } /*--*/ var Success = CheckRule;