Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. FOP2 Chrome Extension doesn't work with clickable callto:

FOP2 Chrome Extension doesn't work with clickable callto:

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 66 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    B
    bitgangsta
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      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,

      1 Reply Last reply
      0
      • B
        B
        bitgangsta
        wrote on last edited by
        #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!

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups