FOP2 Chrome Extension doesn't work with clickable callto:

  1. 11 years ago

    Hi,

    My particular CRM links to numbers automatically by inserting a link (normal <a> tag) to the target callto:phone#. For example:

    <a href="callto:555-555-1212">link</a>

    This would make sense to be clickable in Chrome, but instead it fails to recognize it as a number.

    What would it take to register the click-handler with the extension? It wouldn't happen to be open-source somewhere so I can fix it, would it?

    Thanks,
    Daniel Jabbour
    @bitgangsta

  2. admin

    9 May 2013 Administrator

    Hi,

    The chrome extension will alter static text/content, not tag/anchor or html tags at all. If your crm includes the number in that "link" part it should work.

    I can see if callto links can be modified too...

    Best regards,

  3. I was able to achieve this! I modified the extension to do so. In the file content_script.js I added the following code to execute right before the page is parsed:

    $('a[href*="callto"]').each( function() {
                var link = $(this), newUrl = link.attr('href').replace(/^callto:/,'sip:'), phoneNumber = newUrl.replace(/sip:/, '');
                link.attr('href', newUrl);
                link.attr('rel', phoneNumber);
                link.addClass('fop2-click-to-call');
            });

    It would be great if you can add this to the extension so I don't have to modify it every time I update. But if not, it's fine too!

or Sign Up to reply!