User:SPage (WMF)/common.js

console.log( 'Starting my common.js...' ); /** * Per instructions at Talk:Guided_tours */ console.log( 'Tychay guidedTour.js' ); importScript('User:Tychay/guidedTour.js');

console.log( 'Munaf section edit links' ); $(document).ready(function {

$('span.editsection').each(function (i, el) {       var link = $(this).find('a').attr('href');        $(this).parent.append('Edit section');        $(this).hide;    });

$('#mw-content-text').find(':header').each(function (i, el) {       $(this).on('hover', function  { $(this).find('a.sectionedit').toggleClass('invisible'); });   });

$('#mw-content-text').find('p').each(function (i, el) {       // console.log('found a p ');        $(this).on('hover', function  { // console.log(' p hover '); $($(this).prevAll(':header')[0]).find('a.sectionedit').toggleClass('invisible'); });   });

});