How to remove skype detecting number?

风流意气都作罢 提交于 2019-11-28 05:35:52

问题


Is there any way to remove skype detecting numbers on my website for click to call by incluing any header file or any piece of code? Kindly help so i can remove it...


回答1:


From "How To Prevent Skype from Highlighting Phone Numbers":

<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />

However, I haven't tested nor been able to find the info in Skype's docs (not that I tried that hard).




回答2:


The method outlined by Skype to prevent change on your page is adding a meta tag to the document header to tell the skype component to not touch the numbers. However, this does not work reliably and in my experience is usually ignored.

Rather than rely on Skype’s unreliable override, my preferred solution is to make telephone numbers look like telephone numbers to visitors, but not to Skype. To do this we can add an underscore within a span in the middle of the telephone number, and set the span to not display. Code:

<span style="display:none;">_</span>

EXAMPLE:

Original piece of code in your HTML:

Phone:<span>+381113233309</span>

Code after adding underscore:

<span>+38111-<span style="display:none;">_</span>3233309</span>

Tested and work fine. :)

For Wordpress: I turned this into a simple function to go into either the theme’s functions.php or a functionality plugin which adds an easy-to-remember shortcode, ie the text can be inserted within any phone number but putting a [noskype] shortcode in the middle of the number.

// ==============================================
//       PREVENT SKYPE CLICK-TO-CALL HIJACK
//       add [noskype] within the phone number
// ==============================================
function cc_noskype( $atts, $content = null ) {
return '<span style="display:none;">_</span>';
}
add_shortcode('noskype', 'cc_noskype');

Enjoy




回答3:


It has been reported that this css will work:

span.skype_pnh_container {display:none !important;}
span.skype_pnh_print_container {display:inline !important;}

It works on my machine.




回答4:


Uninstal browser plugin/extension will remove it.




回答5:


Skype inject HTML of a javascript "setTimeout" event. You may hide it with CSS, it is not really removing it from your document. The best way to prevent any action from Skype Click 2 Call, is to destroy the object before the setTimeout action start.

/* Destroy injected objects */
var intervalNumber = 12;
var objectDestroyerInterval = setInterval(function() {

  if(intervalNumber == 0) {clearInterval(objectDestroyerInterval);}

  if(window.SkypeClick2Call) {window.SkypeClick2Call = undefined;}

  intervalNumber--
}, 250);

This script check 12 times in 3 seconds, if any SkypeClick2Call object is available and destroy it. You may want to increase that number of times if necessary. You may also inspire yourself of this script to destroy any other object that your browser may inject

Result: No SkypeClick2Call HTML is injected and no javascript error is logged.




回答6:


function reformatPhoneNumberToDisabeSkypeToCall(){
    var processedNumber = $('#phone').text()
        .replace(/\-/g, "-&shy")
        .replace(/\ /g, "&nbsp");
    $('#phone').html(processedNumber);
}

works for me



来源:https://stackoverflow.com/questions/10353542/how-to-remove-skype-detecting-number

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!