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. */ | |
- | + | ||
- | + | 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', ''); | ||
+ | // } | ||
} | } | ||
- | + | ||
- | </ | + | // <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; | |
- | </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>