As of August 2024, International Journal "Notes on Intuitionistic Fuzzy Sets" is being indexed in Scopus.
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

From Ifigenia, the wiki for intuitionistic fuzzy sets and generalized nets
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
* Copyright 2006, Marc Mongenet. Licence GPL et GFDL.
* 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.
* var oldEditsectionLinks=true disables the function.
* Thanks to Borislav Manolov, again and again :)
*/
*/
   
   
function setModifySectionStyle() {
addOnloadHook(function() {
try {
var sContents = "contents";
if ( typeof oldEditsectionLinks != 'undefined' && oldEditsectionLinks ) return;
var hasToc = $("#toc").length > 0;
var spans = document.getElementsByTagName("span");
 
for (var s = 0, len = spans.length; s < len; ++s) {
$("span.editsection")
var span = spans[s];
.css({"float" : "none"})
if (span.className == "editsection") {
.each( function(){
span.style.cssFloat = span.style.styleFloat = "none";
if (hasToc) {
span.parentNode.appendChild(document.createTextNode(" "));
$(this).append(' [<a href="#toc">'+ sContents +'</a>]')
span.parentNode.appendChild(span);
}
}
} catch (e) { /* something went wrong */ }
}
}
$(this).parent().append(this);
addOnloadHook(setModifySectionStyle);
} );
});

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);
} );
});