• Modification to forum.js

    From dragon@1:103/705 to All on Sat Oct 26 19:11:57 2019
    I have modified my /sbbs/webv4/lib/forum.js.

    Line 710 of function "linkify" was:

    return ('<a class="ulLink" href="' + link + '">' + linktext + '</a>' + str.substr(linktext.length));

    Changed to:

    return ('<a class="ulLink" target=_new rel="noopener noreferrer" href="' + link + '">' + linktext + '</a>' + str.substr(linktext.length));

    This opens external links in a new window or tab (user preference) and hides referrer information for location tracker websites.

    If this is the wrong place to post this, I apologize and please point me in the right direction.

    ---
    ■ Synchronet ■ IPTIA - bbs2.ipingthereforeiam.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From echicken@1:103/705 to dragon on Sat Oct 26 23:40:25 2019
    Re: Modification to forum.js
    By: dragon to All on Sat Oct 26 2019 19:11:57

    This opens external links in a new window or tab (user preference) and
    hides
    referrer information for location tracker websites.

    I messed around with this a month ago and found that in some browsers it insisted on opening links in a new window. What browsers have you tested with?

    It's a good idea for a number of reasons but if implemented I'd also like to make it not lead to ugly UX.

    If this is the wrong place to post this, I apologize and please point me
    in the
    right direction.

    A PR on Github would probably be most appropriate.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From echicken@1:103/705 to dragon on Sat Oct 26 23:45:04 2019
    Re: Modification to forum.js
    By: echicken to dragon on Sat Oct 26 2019 23:40:25

    I messed around with this a month ago and found that in some browsers it
    insisted on opening links
    in a new window. What browsers have you tested with?

    I should have elaborated on this: all those links opened in new *windows* instead of new *tabs*, and I didn't care for that. I also didn't try too hard to figure out a solution; if you've done so, that's great.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ■ Synchronet ■ electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)