• Resolved straitdank

    (@straitdank)


    We remade a site that had this plugin previously installed. I was being lazy and didn’t want to research and configure a new plugin to add some functionality for multiple exit notifications. This has been tested on Chrome and Internet Explorer (the problem child).

    Simply add the class “external-link” to any of your anchor <a> tags that require an alternative exit notifier and then paste the following snippet on the bottom of the page (requires a scripting area – I recommend SOGO Header and Footer):

    //Script to change external links
    
    var externalLinks = document.getElementsByClassName('external-link');
    
    for (var i=0;i<externalLinks.length;i++){
      externalLinks[i].addEventListener('click', function(){
       setTimeout(function(){
           document.getElementsByClassName("ja_title")[0].firstElementChild.innerText = 'Whatever title text you want';
           document.getElementsByClassName("ja_body")[0].firstElementChild.innerText = 'Whatever body text you want.'
       } ,100);
      })
    }
    • This topic was modified 6 years, 6 months ago by straitdank.
    • This topic was modified 6 years, 6 months ago by straitdank.
    • This topic was modified 6 years, 6 months ago by straitdank.
    • This topic was modified 6 years, 6 months ago by straitdank.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multiple Exit Notices – Solution’ is closed to new replies.