MediaWiki:Gadget-HeadingLink.js: Unterschied zwischen den Versionen
Aus Offene Naturführer BiolFlor
(Die Seite wurde neu angelegt: „// <source lang="javascript"> // This JavaScript will be loaded only for some pages, see MediaWiki:Common.js // Copyright A. Plank /* This program is free…“) |
K |
||
Zeile 14: | Zeile 14: | ||
$.extend(true, $.jI18n, { | $.extend(true, $.jI18n, { | ||
en: { | en: { | ||
− | toolTipHeadingLink : 'Permanent link to this headline' | + | toolTipHeadingLink: 'Permanent link to this headline' |
}, | }, | ||
de: { | de: { | ||
− | toolTipHeadingLink : 'Permanenter Link zu dieser Überschrift' | + | toolTipHeadingLink: 'Permanenter Link zu dieser Überschrift' |
} | } | ||
− | |||
}); | }); | ||
if ($j('h2,h3,h4').length) { | if ($j('h2,h3,h4').length) { | ||
Zeile 33: | Zeile 32: | ||
}); | }); | ||
} | } | ||
+ | // </source> |
Version vom 10. Oktober 2011, 13:42 Uhr
// <source lang="javascript">
// This JavaScript will be loaded only for some pages, see MediaWiki:Common.js
// Copyright A. Plank
/*
This program is free software; you can redistribute it and/or modify it under the terms of
the EUPL v.1.1 or (at your option) the GNU General Public License as published by the Free
Software Foundation; either GPL v.3 or (at your option) any later version. This program is
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License (http://www.gnu.org/licenses/) for more details.
*/
/* global $j */
/* add a link of the section while hovering it */
$.extend(true, $.jI18n, {
en: {
toolTipHeadingLink: 'Permanent link to this headline'
},
de: {
toolTipHeadingLink: 'Permanenter Link zu dieser Überschrift'
}
});
if ($j('h2,h3,h4').length) {
$j('h2,h3,h4').mouseenter(function () {
hrefID = $j(this).find('.mw-headline').attr('id');
$j(this).append('<a ' +
' class="headerlink" ' +
' style="color:#CCCCCC" ' +
' title="' + $.resource('toolTipHeadingLink') + '" ' +
' href="#' + hrefID + '?oldid=' + wgCurRevisionId + '" >\u00B6</a>');
}).mouseleave(function () {
$j(this).find('a.headerlink').remove();
});
}
// </source>