Fix wiki links, make red links red

This commit is contained in:
Gabriel Pérez-Cerezo 2020-04-15 19:47:23 +02:00
parent 2678fe5505
commit 1e3c22c159
2 changed files with 4 additions and 1 deletions

View File

@ -27,6 +27,9 @@
color: white;
text-shadow: 0px 0px 5px black;
}
a.new {
color: red;
}
</style>
<script src="mapscript.js"> </script>
</body>

View File

@ -11,7 +11,7 @@ coords=`echo "$json" | sed -n "s/.*coordinates = {{Co|\([^}]*\).*/\1/p"`
coord_x=`echo "$coords" | sed -n "s/\([^|]\+\).*/\1/p"`
coord_y=`echo "$coords" | sed -n "s/.*|\([^|]\+\).*/\1/p"`
description=`curl "https://wiki.linux-forks.de/mediawiki/api.php?action=parse&page=$1&section=0&prop=text&format=json" 2>/dev/null | sed -z -n "s/<\/p><p>//g;s/.*<p>\(.*\)<\/p>.*/\1/p"`
description=`curl "https://wiki.linux-forks.de/mediawiki/api.php?action=parse&page=$1&section=0&prop=text&format=json" 2>/dev/null | sed -z -n "s/<\/p><p>//g;s/.*<p>\(.*\)<\/p>.*/\1/p" | sed s,\"/mediawiki/index.php,\"https://wiki.linux-forks.de/mediawiki/index.php,g`
if [[ "$coord_x" != "" && "$coord_y" != "" ]]; then