• Resolved abuzon

    (@abuzon)


    Hello! I saw this was added in your Insta feed plugin, but not this one. All links are target=_blank but there’s no rel=”noopener” or a way to add it.
    I saw a Support forum post on another of your plugins that said to add the following js.
    $('.sbi_photo').attr('rel', 'nofollow noopener');

    Would this work for the twitter feed?

    $('.ctf-*').attr('rel', 'nofollow noopener');

    I totally pulled the .ctf-* out of my a$$ – I have no idea if javascript even works like that *

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Smash Balloon Mike

    (@smashballoonmike)

    Hey @abuzon,

    Thank you for reaching out to us. You were close, you can add the following to our plugins Custom JavaScript section by going to WordPress Dashboard > Twitter Feeds > Customize > Misc > paste the code into?Custom JavaScript?> click?Save Changes.

    $('.ctf a').attr('rel', 'nofollow noopener');

    Let me know if you run into any issues or have any additional questions. Hope you are having a great day!

    Thread Starter abuzon

    (@abuzon)

    Thank you so much Mike!

    • This reply was modified 4 years, 2 months ago by abuzon.
    Plugin Support Smash Balloon Mike

    (@smashballoonmike)

    Hey @abuzon,

    You’re welcome!

    Let us know if you need anything else in the future. Hope you have a great rest of your week!

    In my testing, Lighthouse 6 via web.dev/measure seems to ignore this JS and still report that “Links to cross-origin destinations are unsafe”.

    I have tried using vanilla JS to achieve the same in case jQuery was delaying the change, but this also did not work according to Lighthouse testing

    var ctflinks = document.querySelectorAll('.ctf a');
    for (var i = 0; i < ctflinks.length;  i++) {
      ctflinks[i].setAttribute('rel', 'noopener');
    }

    Would it be possible to add rel=”noopener” to the feed via PHP filter, plus add to other twitter.com links in the plugin as an option, or even a default setting, as I cannot see what harm it would do to add this as default. Many thanks!

    Plugin Support Smash Balloon Mike

    (@smashballoonmike)

    Hey @bonkerz,

    Thank you for reaching out to us. We will get the noopener added to all links in an upcoming version of the plugin.

    Let me know if this addresses your?concerns or if you have any additional questions. Hope you are having a great night!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to make feed links relationship noopener?’ is closed to new replies.