• Modification to forum.js

    From dragon@VERT/IPTIA to All on Saturday, October 26, 2019 19:11:57
    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
  • From echicken@VERT/ECBBS to dragon on Saturday, October 26, 2019 23:40:25
    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
  • From echicken@VERT/ECBBS to dragon on Saturday, October 26, 2019 23:45:04
    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