Please check our Instructions to Authors and send your manuscripts to nifs.journal@gmail.com. Next issue: March 2025.
MediaWiki:Common.js/Edit section.js: Difference between revisions
Jump to navigation
Jump to search
New page: /** Shifting the edit section links * Copyright 2006, Marc Mongenet. Licence GPL et GFDL. * The function looks for <span class="editsection">, and moves them * to the end of their parent. ... |
+ link to [contents] |
||
Line 1: | Line 1: | ||
/** Shifting the edit section links | /** Shifting the edit section links, adding link to the contents | ||
* The function looks for <span class="editsection">, and moves them | * The function looks for <span class="editsection">, and moves them | ||
* to the end of their parent. | * to the end of their parent. Adds link to the contents of the page. | ||
* | * Thanks to Borislav Manolov, again and again :) | ||
*/ | */ | ||
function | addOnloadHook(function() { | ||
var sContents = "contents"; | |||
var hasToc = $("#toc").length > 0; | |||
$("span.editsection") | |||
.css({"float" : "none"}) | |||
.each( function(){ | |||
if (hasToc) { | |||
$(this).append(' [<a href="#toc">'+ sContents +'</a>]') | |||
} | } | ||
$(this).parent().append(this); | |||
} ); | |||
}); |
Latest revision as of 17:54, 23 May 2009
/** Shifting the edit section links, adding link to the contents
* The function looks for <span class="editsection">, and moves them
* to the end of their parent. Adds link to the contents of the page.
* Thanks to Borislav Manolov, again and again :)
*/
addOnloadHook(function() {
var sContents = "contents";
var hasToc = $("#toc").length > 0;
$("span.editsection")
.css({"float" : "none"})
.each( function(){
if (hasToc) {
$(this).append(' [<a href="#toc">'+ sContents +'</a>]')
}
$(this).parent().append(this);
} );
});