ഉപയോക്താവ്:Anoopan/Gadget-edittop.js
ശ്രദ്ധിക്കുക: സേവ് ചെയ്തശേഷം മാറ്റങ്ങൾ കാണാനായി താങ്കൾക്ക് ബ്രൗസറിന്റെ കാഷെ ഒഴിവാക്കേണ്ടി വന്നേക്കാം.
- ഫയർഫോക്സ് / സഫാരി: Reload ബട്ടൺ അമർത്തുമ്പോൾ Shift കീ അമർത്തി പിടിക്കുകയോ, Ctrl-F5 അല്ലെങ്കിൽ Ctrl-R (മാക്കിന്റോഷിൽ ⌘-R ) എന്ന് ഒരുമിച്ച് അമർത്തുകയോ ചെയ്യുക
- ഗൂഗിൾ ക്രോം: Ctrl-Shift-R (മാക്കിന്റോഷിൽ ⌘-Shift-R ) അമർത്തുക
- ഇന്റർനെറ്റ് എക്സ്പ്ലോറർ: Refresh ബട്ടൺ അമർത്തുമ്പോൾ Ctrl കീ അമർത്തിപിടിക്കുക. അല്ലെങ്കിൽ Ctrl-F5 അമർത്തുക
- ഓപ്പറ: Menu → Settings എടുക്കുക (മാക്കിൽ Opera → Preferences) എന്നിട്ട് Privacy & security → Clear browsing data → Cached images and files ചെയ്യുക.
// **********************************************************************
// ** ***WARNING GLOBAL GADGET FILE*** **
// ** changes to this file affect many users. **
// ** please discuss on the talk page before editing **
// ** **
// **********************************************************************
// Imported from [[User:Alex Smotrov/edittop.js]], version as of: 2007-06-19T04:28:52
// Updated from [[User:TheDJ/Gadget-edittop.js]], version as of: 2009-04-28T11:54:22
if ((wgAction == 'view' || wgAction == 'purge') && wgNamespaceNumber >=0)
addOnloadHook(function edittop_hook(){
var localtitles = {
en: 'Edit lead section',
ml: 'പ്രധാന ഭാഗം തിരുത്തുക'
};
var our_content = document.getElementById('content') || document.getElementById('mw_content') || document.body;
var editspans = getElementsByClassName( our_content, "span", "editsection");
var span1;
for( es_count = 0; editspans && es_count < editspans.length; es_count++ )
{
span1 = editspans[es_count];
if( span1.className.indexOf( "plainlinks" ) == -1 )
break;
}
if (!span1) return;
var span0 = span1.cloneNode(true);
var editwidth = span1.offsetWidth + 10;
var topicons = getElementsByClassName( our_content, 'div', "topicon" );
for( el=0; topicons && el < topicons.length; el++ )
{
topicons[el].style.marginRight = editwidth+"px";
}
our_content = document.getElementById('mw_header') || document.getElementById('content') || document.body;
var parent = our_content.getElementsByTagName('H1')[0];
parent.insertBefore(span0, parent.firstChild);
var a = span0.getElementsByTagName('A')[0];
if (a.href.indexOf('§ion=T') == -1){
a.title = a.title.replace(/:.*$/,': 0')
a.setAttribute('href', a.href.replace(/§ion=\d+/,'§ion=0'));
}else{//transcluded
a.title = localtitles['en']
a.setAttribute('href', wgScript+'?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=edit§ion=0')
}
if (localtitles[wgUserLanguage]) a.title = localtitles[wgUserLanguage]
})