MediaWiki
Group-Grouse.js: Difference between revisions
From Grouse House Wiki
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
var $headername = $header.html(); | var $headername = $header.html(); | ||
$headernameu = $headername.split(' ').join('_'); | $headernameu = $headername.split(' ').join('_'); | ||
$headernameu = $headernameu.replace("'", "\\'"); | |||
var $secondheader = "#" + $headernameu + "_2"; | var $secondheader = "#" + $headernameu + "_2"; | ||
Line 22: | Line 23: | ||
var $headername = $header.html(); | var $headername = $header.html(); | ||
$headernameu = $headername.split(' ').join('_'); | $headernameu = $headername.split(' ').join('_'); | ||
$headernameu = $headernameu.replace("'", "\\'"); | |||
var $secondheader = "#" + $headernameu + "_2"; | var $secondheader = "#" + $headernameu + "_2"; | ||
Line 39: | Line 41: | ||
var $headername = $header.html(); | var $headername = $header.html(); | ||
$headernameu = $headername.split(' ').join('_'); | $headernameu = $headername.split(' ').join('_'); | ||
$headernameu = $headernameu.replace("'", "\\'"); | |||
var $secondheader = "#" + $headernameu + "_2"; | var $secondheader = "#" + $headernameu + "_2"; | ||
Line 61: | Line 64: | ||
var $headername = $header.html(); | var $headername = $header.html(); | ||
$headernameu = $headername.split(' ').join('_'); | $headernameu = $headername.split(' ').join('_'); | ||
$headernameu = $headernameu.replace("'", "\\'" | $headernameu = $headernameu.replace("'", "\\'"); | ||
var $secondheader = "#" + $headernameu + "_2"; | var $secondheader = "#" + $headernameu + "_2"; | ||
Line 71: | Line 74: | ||
$("a[href*='" + $secondheader + "']").hide(); | $("a[href*='" + $secondheader + "']").hide(); | ||
}); | }); | ||
}); | }); | ||
Line 81: | Line 82: | ||
var $headername = $header.html(); | var $headername = $header.html(); | ||
$headernameu = $headername.split(' ').join('_'); | $headernameu = $headername.split(' ').join('_'); | ||
$headernameu = $headernameu.replace("'", "\\'"); | |||
var $secondheader = "#" + $headernameu + "_2"; | var $secondheader = "#" + $headernameu + "_2"; | ||
Line 103: | Line 105: | ||
var $headername = $header.html(); | var $headername = $header.html(); | ||
$headernameu = $headername.split(' ').join('_'); | $headernameu = $headername.split(' ').join('_'); | ||
$headernameu = $headernameu.replace("'", "\\'"); | |||
var $secondheader = "#" + $headernameu + "_2"; | var $secondheader = "#" + $headernameu + "_2"; |
Revision as of 23:33, 5 February 2024
$(function() { $('h2.c-header.active span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h2.c-header.hidden span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); $("a[href='" + $secondheader + "']").hide(); }); }); $(function() { $('h2.h-static span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); var $pagename = $('h1#firstHeading').html(); $pagenameu = $pagename.split(' ').join('_'); $toclink = "https://grousehouse.wiki/" + $pagenameu + $secondheader; $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h3.c-header.active span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h3.c-header.hidden span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); var $pagename = $('h1#firstHeading').html(); $pagenameu = $pagename.split(' ').join('_'); $toclink = "https://grousehouse.wiki/" + $pagenameu + $secondheader; $("a[href*='" + $secondheader + "']").hide(); }); }); $(function() { $('h3.h-static span.mw-headline').each(function () { var $header = $(this); var $headername = $header.html(); $headernameu = $headername.split(' ').join('_'); $headernameu = $headernameu.replace("'", "\\'"); var $secondheader = "#" + $headernameu + "_2"; var $editsection = $( $secondheader ).next().children('a').attr("href"); $header.after('[Edit]'); $header.next().css( 'font-size', '0.6em').css( 'margin-left', '1em'); var $pagename = $('h1#firstHeading').html(); $pagenameu = $pagename.split(' ').join('_'); $toclink = "https://grousehouse.wiki/" + $pagenameu + $secondheader; $("a[href*='" + $secondheader + "']").hide(); }); });