MediaWiki

Group-Grouse.js: Difference between revisions

From Grouse House Wiki

No edit summary
No edit summary
Line 1: Line 1:


$(function() {
$(function() {
     $('h2.c-header.active span.mw-headline').each(function () {
     $('span.c-header.active').each(function () {
         var $header = $(this);
         var $header = $(this);
         var $headername = $header.html();
         var $headername = $header.html();
         $headernameu = $headername.replace(" ", "_");
         $headernameu = $headername.replace(" ", "_");


         var $secondheader = "#" + $headernameu + "_2";
         var $secondheader = "#" + $headernameu;


         var $editsection = $( $secondheader ).next().children('a').attr("href");
         var $editsection = $( $secondheader ).next().children('a').attr("href");

Revision as of 01:29, 3 February 2024


$(function() {
    $('span.c-header.active').each(function () {
        var $header = $(this);
        var $headername = $header.html();
        $headernameu = $headername.replace(" ", "_");

        var $secondheader = "#" + $headernameu;

        var $editsection = $( $secondheader ).next().children('a').attr("href");

        $header.after('[Edit]');
    });
 });