question

tommy-figgs6378 avatar image
tommy-figgs6378 asked ·

call from javascript using chrome extension

The Chrome extension works great, but I need to run a function before dialing the number from my website. Like:

<button type='button' onclick=makecall('".$result->PHONE."')>".$result->PHONE."</button>

<script>
function makecall($number){
       alert("tel:"+thenumber);
       window.location.href("tel:"+$number);
}
</script>

Is there a function in the chrome extension I can call to send the number to the dialer?
General Topic
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

· Write an Answer
Tyler Liu avatar image
Tyler Liu answered ·
RingCentral Chrome Extension is not open source and we don't provide any public API for it. So I am afraid that it doesn't exist.
1 comment
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

I traced the debug of RC's own Chrome extension and this code works:
window.top.postMessage({
          type: 'c2d',
          number: '012231234567890',
          isQuickAccess: true
        }, '*');
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.