mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-22 20:13:35 -04:00
Small fixes for links inside an article
This commit is contained in:
parent
ecf48a0d41
commit
fb8408e878
@ -164,11 +164,10 @@ define(function(require) {
|
|||||||
title = title[0];
|
title = title[0];
|
||||||
if (title.fileNr == 255) {
|
if (title.fileNr == 255) {
|
||||||
localArchive.resolveRedirect(title, readArticle);
|
localArchive.resolveRedirect(title, readArticle);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
localArchive.readArticle(title, displayArticleInForm);
|
||||||
localArchive.readArticle(title, displayArticleInForm);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -190,6 +189,9 @@ define(function(require) {
|
|||||||
else if (url.substring(0,4) === "http") {
|
else if (url.substring(0,4) === "http") {
|
||||||
// It's an external link : do nothing
|
// It's an external link : do nothing
|
||||||
}
|
}
|
||||||
|
else if (url.substring(0,2) === ".." || url.substring(0,4) === "./..") {
|
||||||
|
// It's a link to another language : TODO redirect to the online article?
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
// It's a link to another article : add an onclick event to go to this article
|
// It's a link to another article : add an onclick event to go to this article
|
||||||
// instead of following the link
|
// instead of following the link
|
||||||
|
Loading…
x
Reference in New Issue
Block a user