98
Bearbeitungen
JSC (Diskussion | Beiträge) |
JSC (Diskussion | Beiträge) |
||
Zeile 89: | Zeile 89: | ||
// massage the area "href" and create a human legible string to be used as the tooltip of "li" | // massage the area "href" and create a human legible string to be used as the tooltip of "li" | ||
function pageOfHref(href, cssClass) { | function pageOfHref(href, cssClass) { | ||
var page = href.replace(document.location.protocol + mw.config.get( 'wgServerName' ) + "/wiki/", '').replace(/.*\/\//, '').replace(/_/g, ' '); /*JSC 210819: veraltete Funktion ausgetauscht */ | |||
var page = href.replace(document.location.protocol + mw.config.get( 'wgServerName' ) + "/wiki/", '').replace(/.*\/\//, '').replace(/_/g, ' '); | |||
page = page.replace(/#(.*)/, function(toReplace){return toReplace.replace(/\.([\dA-F]{2})/g, '%$1');}); | page = page.replace(/#(.*)/, function(toReplace){return toReplace.replace(/\.([\dA-F]{2})/g, '%$1');}); | ||
page = decodeURIComponent(page); // used for "title" of legends - just like "normal" wiki links. | page = decodeURIComponent(page); // used for "title" of legends - just like "normal" wiki links. |