User:Howief (WMF)/vector.js

/** * NICE gadget *  * This gadget is part of a research study being conducted by the * GroupLens Research lab at the University of Minnesota. Please see * the consent form at http://wikipedia.grouplens.org/NICE/consent. * If you have questions/comments/suggestions, please direct them to * User:EpochFail. **/ importScript("User:EpochFail/No_Biting.js")

32 33 34 35 36 37 38

$(document).ready(function {    // Hide existing edit links and place new ones, invisibly    $('span.editsection').each(function (i, el) { var link = $(this).find('a').attr('href'); $(this).parent.append('Edit section'); $(this).hide; });   // Apply hover states to article content    $('#mw-content-text').find(':header').each(function (i, el) { // Hover state for headers $(this).on('hover', function {            $(this).find('a.sectionedit').toggleClass('invisible');        }); // Hover state for content $(this).nextUntil(':header').on('hover', function {            $($(this).prevAll(':header')[0]).find('a.sectionedit').toggleClass('invisible');        }); });   // Hover state for sections    $('a.sectionedit').on('mouseover', function { var $parent = $(this).parent, parentTag = ($parent.prop('tagName') + '').toLowerCase; $parent.nextUntil(parentTag).add($parent).css({ 'background-color' : '#FCFCE1' }); });   $('a.sectionedit').on('mouseout', function { var $parent = $(this).parent, parentTag = ($parent.prop('tagName') + '').toLowerCase; $parent.nextUntil(parentTag).add($parent).css({ 'background-color' : '#ffffff' }); }); });