User:Skizzerz/Scripts

This is a repository of various javascript tools that may be useful to you when editing and such. To get these tools, put the javascript in your user js (usually Special:Mypage/BlueCloud.js), then clear your browser cache.

Edit section link for the top section
Adds an edit link that lets you section edit the very top section. /****************************************** if (wgAction == 'view' && wgNamespaceNumber >=0) addOnloadHook(function{ var h2s = document.getElementsByTagName('H2');  var h2 = h2s[0];  if (!h2) return;  if (h2.parentNode.id == 'toctitle') h2 = h2s[1];  if (!h2) return;  var span = h2.firstChild;  if (!span || span.className != 'editsection') return;  var zero = span.cloneNode(true);  if (document.getElementById('featured_icon')) zero.style.marginRight = '30px'  var parent = document.getElementsByTagName('H1')[0];  parent.insertBefore(zero, parent.firstChild);  var a = zero.getElementsByTagName('A')[0];  a.title = a.title.replace(/:.*$/,': 0');  a.setAttribute('href', a.href.replace(/&section=1/,'&section=0')); })
 * Add Section Edit link for top section **

Auto-edit script
Enables an auto-clicking script /******************** document.write(' ');
 * AutoEdit Script **

Find-and-replace script
Enables a search-and-replace function for the edit box, including regex search /**************************** document.write(' ');
 * Find and Replace Script **

Edit Summary Extender
Adds a string of text when an edit summary is too short. I actually wrote this one by mahself ^_^ /******************************* function check_edit_summary(event) { var summary=document.getElementById('wpSummary').value; if(summary.length<3) document.getElementById('wpSummary').value += '/* Edit Summary Extender v1.0 */'; }
 * Edit Summary Extender v1.0 **

More?
Want something that's not listed here? Try searching for it on Google or some other search engine and if you still can't find it, feel free to drop a message on my talk page and I'll attempt to write it :)