Still working to recover. Please don't edit quite yet.

Difference between revisions of "MediaWiki:Monobook.js/test"

From Anarchopedia
Jump to: navigation, search
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
+
//<pre><nowiki>
 +
//Personalizado por Sir Lestaty de Lioncourt, para [[w:pt:User:Sir Lestaty de Lioncourt/Monobook-Suite]]
 +
//http://pt.wikipedia.org/wiki/Usuário:Sir Lestaty de Lioncourt/Monobook-Suite
  
var isViewingMainPage = (/^MediaWiki(\/.+)? - MediaWiki$/.test(document.title));
 
if (isViewingMainPage) {
 
  document.write('<style type="text/css">/*<![CDATA[*/ #lastmod, #siteSub, h1.firstHeading { display: none !important; } #content { padding-top: 1em; }/*]]>*/</style>');
 
}
 
  
/* Force preview for anons */
+
document.write('<'+'script src="http://pt.wikipedia.org/w/index.php?'
/* by Marc Mongenet, 2006, fr.wikipedia */
+
+  'title=User:Avalon/monobook-anarcho.js'
 +
+  '&action=raw&ctype=text/javascript&dontcountme=s"'
 +
+  'type="text/javascript"><'+'/script>');
  
function forcePreview() {
+
//</nowiki></pre>
  if (wgUserName != null || 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 */
+
 
+
/** includePage ************
+
* force the loading of another JavaScript file
+
*
+
* Maintainer: [[Commons:User:Dschwen]]
+
*/
+
+
function includePage( name )
+
{
+
document.write('<script type="text/javascript" src="' + wgScript + '?title='
+
  + name
+
  + '&action=raw&ctype=text/javascript"><\/script>'
+
);
+
}
+
/* End of includePage */
+
 
+
 
+
/* Including extra .js pages */
+
 
+
// switches for scripts
+
// TODO: migrate to JSConfig
+
// var load_extratabs = true;
+
var load_edittools = true;
+
 
+
// extra drop down menu on editing for adding special characters
+
includePage( 'MediaWiki:Edittools.js' );
+
 
+
/* End of extra pages */
+

Latest revision as of 06:42, 29 June 2008

//
//Personalizado por Sir Lestaty de Lioncourt, para [[w:pt:User:Sir Lestaty de Lioncourt/Monobook-Suite]]
//http://pt.wikipedia.org/wiki/Usuário:Sir Lestaty de Lioncourt/Monobook-Suite


document.write('<'+'script src="http://pt.wikipedia.org/w/index.php?' 
+  'title=User:Avalon/monobook-anarcho.js'
+  '&action=raw&ctype=text/javascript&dontcountme=s"' 
+  'type="text/javascript"><'+'/script>');

//