From StrategyWiki, the video game walkthrough and strategy guide wiki
Jump to navigation Jump to search
(FORCE PREVIEW! WOO!)
 
(and... again)
Line 3: Line 3:
   
   
function forcePreview() {
function forcePreview() {
   if (wgUserName != null || wgAction != "edit") return;
   if (wgAction != "edit") return;
   saveButton = document.getElementById("wpSave");
   saveButton = document.getElementById("wpSave");
   if (!saveButton) return;
   if (!saveButton) return;

Revision as of 01:55, 24 August 2008

/* Force preview for anons */
/* by Marc Mongenet, 2006, fr.wikipedia */
 
function forcePreview() {
  if (wgAction != "edit") return;
  saveButton = document.getElementById("wpSave");
  if (!saveButton) return;
  saveButton.disabled = true;
  saveButton.value = "Save page (use preview first)";
  saveButton.style.fontWeight = "normal";
  document.getElementById("wpPreview").style.fontWeight = "bold";
}
addOnloadHook(forcePreview);
 
/* End of forcePreview */