User:Goodshoped35110s/Scripts/spamBuster.js

//part 1 addOnloadHook(func_start); //means «execute func_start later» //part 2 — executed when the page is loaded function func_start { //quite often it simply adds a javascript link  } //and then there is … //part 3 — executed when user clicks on this link function func_action { }

 

if (document.URL.indexOf('action=history') != -1) { //continue only on history pages

if (wgCanonicalNamespace == 'User_talk') { //continue only on User_talk pages

function func_start { if (!document.editform) return; //no edit form → exit … …

 Header    //links   … …

//Example: add the link into «toolbox» portlet addPortletLink ('p-tb', '/wiki/Special:MyPage/monobook.js', 'My monobook.js');

//Example: using innerHTML to create a new portlet document.getElementById('p-participation').innerHTML += ' '+ ' '+  ' mine '+ ' '+ 'My monobook.js'+ ' ';

//Example: remove copyright warning from edit page var el = document.getElementById('editpage-copywarn'); if (el) el.style.display = 'none';

//Example: modify signature button. if (mwEditButtons.length >= 10 && mwEditButtons[9].tagOpen == '---Go od  sh oped 00:09, 24 November 2007 (UTC)') mwEditButtons[9].tagOpen = ' — -Go od  sh oped 00:09, 24 November 2007 (UTC)';

//Example: adding your own quick insert to Edittools var specialchars = document.getElementById ('editpage-specialchars'); specialchars.innerHTML += "<a onclick=\"insertTags(' ',' ','');return false\" href='#'>&lt;div&gt;</a>";