Header

From Bananawiki

(Difference between revisions)
 
(6 intermediate revisions not shown)
Line 1: Line 1:
-
  <script type="text/javascript">
+
  <style type="text/css">
-
  //Your Javascript Here
+
/* Rulebreaker toolbox link - modified slightly by The Mu from the Anti-Troll Fighting Kit made by Conchris. Not sure if this works yet. */
-
  //Note: if you want your code to look nice on this page, put a space at the beginning of each line
+
  window.onload = Main;
-
  </script>
+
 +
function Main() {
 +
    document.write(document.URL);
 +
    addtoolboxlinks();
 +
}
-
  <style type="text/css">
+
  function addlilink(tabs, url, name, id) {
-
  /* This is the default style sheet that you can override : http://editthis.info/wiki/skins/monobook/main.css
+
    var na = document.createElement('a');
-
      For example uncomment this next section to turn all the text 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;
-
  body {
+
 
-
     color: green;
+
  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>
 +
 
 +
function rulebreaker() {
 +
    origEditText = document.editform.wpTextbox1;
 +
    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