FlightGear wiki:Instant-Refs: Difference between revisions

Jump to navigation Jump to search
a2wikilinks: don't display the text from automatic forum links (http://blabla...bla)
(a2wikilinks: don't display the text from automatic forum links (http://blabla...bla))
Line 161: Line 161:
         // they need special treatment, or they get displayed
         // they need special treatment, or they get displayed
         html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(File:.*?)".*?>(.*?)<\/a>/g, "[[:$1|$2]]");
         html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(File:.*?)".*?>(.*?)<\/a>/g, "[[:$1|$2]]");
        // automatic links to the wiki (we don't use the displayed text)
        html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(.*?)".*?>https?:\/\/wiki.flightgear.org.*?<\/a>/g, "[[$1]]");
        // links to the wiki with custom text (we preserve it)
         html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(.*?)".*?>(.*?)<\/a>/g, "[[$1|$2]]");
         html = html.replace(/<a[^(?:href)]*href="https?:\/\/wiki.flightgear.org\/(.*?)".*?>(.*?)<\/a>/g, "[[$1|$2]]");
       
         // then the others
         // then the others
         html = html.replace(/<a[^(?:href)]*href="(.*?)".*?>(.*?)<\/a>/g, "[$1 $2]");
         html = html.replace(/<a[^(?:href)]*href="(.*?)".*?>(.*?)<\/a>/g, "[$1 $2]");
573

edits

Navigation menu