Greasy Fork is available in English.

Linkification

Turn plain text URLs into clickable links

< Σχολιασμός για τον κώδικα Linkification

Ερώτηση/σχόλιο

§
Δημοσιεύτηκε: 03/12/2016
Επεξεργάστηκε: 09/01/2017

[RESOLVED] Strange case of addons.mozilla.org

Dear @dartraiden, please open the following link and scroll down to a review titled “Works well for me, just one bug I found” which mentions a few links (e.g. imgur, stackoverflow), but they are not linkified. Now let’s open a separate page dedicated to that particular review and voila, links are linkified as expected. What do you think of it?

§
Δημοσιεύτηκε: 06/12/2016

Hello?

§
Δημοσιεύτηκε: 11/12/2016

Seems working for me with:
Linkify Plus Plus

§
Δημοσιεύτηκε: 11/12/2016
Επεξεργάστηκε: 11/12/2016

@decembre, you use different solution, whereas I'm interested in polishing this one.

§
Δημοσιεύτηκε: 16/12/2016

@dartraiden, are you there?

dartraidenΔημιουργός
§
Δημοσιεύτηκε: 02/01/2017
Επεξεργάστηκε: 02/01/2017

Maybe comments on AMO are loaded by scripts/AJAX, etc... (after userscript). Or maybe it's Firefox specific bug (I will try test in Chrome)

§
Δημοσιεύτηκε: 03/01/2017
Επεξεργάστηκε: 03/01/2017

@dartraiden, that page’s source contains no traces of reviews, so it seems they are loaded after userscript, just as you suspected. And since I believe repeated script execution every X seconds like “Linkify++” could harm the performance and there is no other way to deal with this issue, than it is resolved. Do you agree?

dartraidenΔημιουργός
§
Δημοσιεύτηκε: 08/01/2017
Επεξεργάστηκε: 08/01/2017

Tested on Opera (Crome engine). Same behaviour as Firefox. You are right, repeat script execution is a bad idea.

There is a way to handle AJAX content, but it very complicate for me and require jQuery loading. Another way is using DOMSubtreeModified, but it's deprecated.

Δημοσίευση απάντησης

Συνδεθείτε για να δημοσιεύσετε μια απάντηση.