Támogatás keresése

Kerülje el a támogatási csalásokat. Sosem kérjük arra, hogy hívjon fel egy telefonszámot vagy osszon meg személyes információkat. Jelentse a gyanús tevékenységeket a „Visszaélés bejelentése” lehetőséggel.

További tudnivalók

A témacsoportot lezárták és archiválták. Tegyen fel új kérdést, ha segítségre van szüksége.

#-links (citations on wikipedia) in reader view don't work properly.

  • 2 válasz
  • 1 embernek van ilyen problémája
  • 3 megtekintés
  • Utolsó üzenet ettől: cor-el

more options

In Reader View, when clicking #-links, as in links that makes you jump to somewhere else on the page, firefox doesn't open the link properly.

For example, the citation https://en.wikipedia.org/wiki/Cley_Marshes#cite_note-NAE9-1 on https://en.wikipedia.org/wiki/Cley_Marshes becomes https://en.wikipedia.org/wiki/#cite_note-NAE9-1 and thus, clicking the link redirects me to https://en.wikipedia.org/wiki/Main_Page#cite_note-NAE9-1 instead of jumping down to the citation on the page, neither in reader view or normally.

I have the same problem on another site which uses #-links as footnotes. On http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67 the footnote http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67#cite_note-1 becomes http://www.baka-tsuki.org/project/#cite_note-1 and thus redirects to http://www.baka-tsuki.org/project/index.php?title=Main_Page#cite_note-1 instead of jumping down the page.

I suspect it has something to do with how #-links are coded, but I don't know.

Is this a bug, and is there anything I can do to fix this?

Any help would be greatly appreciated.

Thanks in advance.

In Reader View, when clicking #-links, as in links that makes you jump to somewhere else on the page, firefox doesn't open the link properly. For example, the citation https://en.wikipedia.org/wiki/Cley_Marshes#cite_note-NAE9-1 on https://en.wikipedia.org/wiki/Cley_Marshes becomes https://en.wikipedia.org/wiki/#cite_note-NAE9-1 and thus, clicking the link redirects me to https://en.wikipedia.org/wiki/Main_Page#cite_note-NAE9-1 instead of jumping down to the citation on the page, neither in reader view or normally. I have the same problem on another site which uses #-links as footnotes. On http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67 the footnote http://www.baka-tsuki.org/project/index.php?title=Mushoku_Tensei:Web_Chapter_67#cite_note-1 becomes http://www.baka-tsuki.org/project/#cite_note-1 and thus redirects to http://www.baka-tsuki.org/project/index.php?title=Main_Page#cite_note-1 instead of jumping down the page. I suspect it has something to do with how #-links are coded, but I don't know. Is this a bug, and is there anything I can do to fix this? Any help would be greatly appreciated. Thanks in advance.

Összes válasz (2)

more options

I have seen this before in bug, however I do not have an eta for when this will change.

Please add your vote to this bug. There might also be a duplicate bug, but I could not find it.

Módosította: guigs,

more options

It looks that this version of processing a link isn't covered by the code.

So it uses pathBase + uri where uri is the relative link (href="#cite_note-NAE9-1")

207   _fixRelativeUris: function(articleContent) {
208     var scheme = this._uri.scheme;
209     var prePath = this._uri.prePath;
210     var pathBase = this._uri.pathBase;
211
212     function toAbsoluteURI(uri) {
213       // If this is already an absolute URI, return it.
214       if (/^[a-zA-Z][a-zA-Z0-9\+\-\.]*:/.test(uri))
215         return uri;
216 
217       // Scheme-rooted relative URI.
218       if (uri.substr(0, 2) == "//")
219         return scheme + "://" + uri.substr(2);
220 
221       // Prepath-rooted relative URI.
222       if (uri[0] == "/")
223         return prePath + uri;
224 
225       // Dotslash relative URI.
226       if (uri.indexOf("./") === 0)
227         return pathBase + uri.slice(2);
228 
229       // Standard relative URI; add entire path. pathBase already includes a
230       // trailing "/".
231       return pathBase + uri;
232     }