Header

From Bananawiki

(Difference between revisions)
 
Line 1: Line 1:
  <style type="text/css">
  <style type="text/css">
-
  /*
+
/* Rulebreaker toolbox link - modified slightly by The Mu from the Anti-Troll Fighting Kit made by Conchris. Not sure if this works yet. */
-
      Notes:
+
 
-
      -You must log as admin to edit this page
+
window.onload = Main;
-
      -Whatever you enter in this page will be added to the html in the header after the standard style sheet, so you can override styles.  
+
 
-
      -if you want your code to look nice on this page, put a space at the beginning of each line
+
function Main() {
-
      -This is the default style sheet that you can override : http://editthis.info/wiki/skins/monobook/main.css
+
    document.write(document.URL);
-
     
+
    addtoolboxlinks();
-
      For example uncomment this next section to turn all the text green:
+
}
-
  */
+
 
-
  /*
+
function addlilink(tabs, url, name, id) {
-
  body {
+
    var na = document.createElement('a');
-
     color: green;
+
    na.href = url;
 +
    na.id = id;
 +
    na.appendChild(document.createTextNode(name));
 +
    var li = document.createElement('li');
 +
    li.appendChild(na);
 +
    tabs.appendChild(li);
 +
    return li;
 +
  }
 +
 
 +
url = document.URL;
 +
 
 +
function addtoolboxlinks() {
 +
  // if (url.search(action=edit) != -1) {
 +
     var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
 +
    addlilink(tb, 'javascript:rulebreaker()', 'Mark as rulebreaker', '');  
 +
  // }
  }
  }
-
  */  
+
-
  </style>
+
// <nowiki>
 +
  autoDelete = "{{AutoDelete\
 +
";
 +
autoDelete += "|year=2007\
 +
";
 +
autoDelete += "|rule1=1\
 +
";
 +
autoDelete += "|rule2=1.5\
 +
";
 +
autoDelete += "|rule3=\
 +
";
 +
autoDelete += "|rule4=\
 +
";
 +
autoDelete += "|date=~~~~~\
 +
";
 +
autoDelete += "|day={{subst:#time: z}}\
 +
";
 +
autoDelete += "}}";
 +
// </nowiki>
-
  <script type="text/javascript">
+
  function rulebreaker() {
-
  //Feel free to add your javascript code here.
+
    origEditText = document.editform.wpTextbox1;
-
  </script>
+
    document.editform.wpTextbox1 = autoDelete + "\
 +
\
 +
" + origEditText;
 +
  } </script>

Current revision as of 16:39, 14 July 2007

<style type="text/css">
/* Rulebreaker toolbox link - modified slightly by The Mu from the Anti-Troll Fighting Kit made by Conchris. Not sure if this works yet. */
window.onload = Main;
function Main() {
   document.write(document.URL);
   addtoolboxlinks();
}
function addlilink(tabs, url, name, id) {
    var na = document.createElement('a');
    na.href = url;
    na.id = id;
    na.appendChild(document.createTextNode(name));
    var li = document.createElement('li');
    li.appendChild(na);
    tabs.appendChild(li);
    return li;
}
url = document.URL;
function addtoolboxlinks() {
  // if (url.search(action=edit) != -1) {
   var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
   addlilink(tb, 'javascript:rulebreaker()', 'Mark as rulebreaker', ); 
  // }
}

// autoDelete = "{{AutoDelete\ "; autoDelete += "|year=2007\ "; autoDelete += "|rule1=1\ "; autoDelete += "|rule2=1.5\ "; autoDelete += "|rule3=\ "; autoDelete += "|rule4=\ "; autoDelete += "|date=~~~~~\ "; autoDelete += "|day={{subst:#time: z}}\ "; autoDelete += "}}"; //

function rulebreaker() {
   origEditText = document.editform.wpTextbox1;
   document.editform.wpTextbox1 = autoDelete + "\

\ " + origEditText;

} </script>
Personal tools