User:The Voidwalker/alwaysEditSectionLink.js

// Makes edit section links appear everywhere they don't exist but probably should. Only probably, they might turn up in unexpected places.

if(mw.config.get('wgAction') === 'view' && $('.mw-headline')[0] && !$('.mw-editsection')[0] && mw.config.get('wgIsProbablyEditable')) { $('.mw-headline').wrap(' '); for (var i = 0; i < $('.mw-headline').length; i++) { $('#mw-headline')[0].id = 'header-' + i;   	var link = mw.util.getUrl(mw.config.get('wgPageName'), {action: "edit", section: i + 1}); $('#header-' + i).after(			$(' ')				.addClass('mw-editsection')				.append( document.createTextNode('[ '), $('') .attr('href', link) .text('edit source'), document.createTextNode(' ]') )		);	} }