Howto Remove Skype Plugin Markup with jQuery
If you have installed the latest version of Skype on Windows, it automatically installs browser plugins for IE and FireFox. The browser plugin detects phone numbers on the page injects markup with clickable links to dial the number in Sykpe.
This has caused some issues for Web Developers because the plugin sometimes picks up text that is not actually a phone number. Or it can screw up a design that has fixed width requirements.
So how do you disable this nice feature? Skype had supported a meta tag at one point:
<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
This meta tag is not supported in the Current Version, as confirmed by a Skype Employee.
The HTML that the plugin injects is all styled with CSS using !important directives, so it is difficult to get rid of their styling using CSS, that's why I had to write some JavaScript disable the skype plugin. Using jQuery makes this very easy, just insert this code into your head tag:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" language="javascript"></script>
<script language="javascript">
$(document).ready(function() {
window.setTimeout(function() {
$('.skype_pnh_container').html('');
$('.skype_pnh_print_container').removeClass('skype_pnh_print_container');
}, 800);
});
</script>
It's annoying that Skype makes you go through these hoops to disable their plugin, it would be nice if they supported something like this:
<meta content="telephone=no" name="format-detection">
Which you can use to tell mobile phones such as an iPhone not to detect phone numbers on the page.
Tweet
Related Entries
- Getting Started with jQuery Mobile - October 29, 2010
- jQuery UI Autocomple IE 6 Select List z-Index Issues - August 16, 2010
- Using jQuery UI Autocomplete with Hidden ID's - July 14, 2010
- jQuery UI Sortable Tutorial - January 7, 2010
- Adobe AIR Tutorial for HTML / JavaScript Developers - February 25, 2008
Trackbacks
Comments
span.skype_pnh_container { display:none !important; }
span.skype_pnh_print_container { display:inline !important; }
I had the code in my website but I still have the some problem in IE. You know what I can do to get rid of that in IE as well?
So there's how to do it :
Let's say you want to add this telephone number to your website :
1-234-567-8910
So this number will actually be detected by skype plug-in, and in order to avoid it, just add an HTML comment inside, like this :
1-234-5<!--Anti Skype Plug-in Comment-->67-8910
Or just put some random text.
It will always work, no javascript needed ;)
<meta name=”SKYPE_TOOLBAR” content =”SKYPE_TOOLBAR_PARSER_COMPATIBLE”/>
Post a Comment
Recent Entries
- Writing Secure CFML cfObjective 2013 Slides
- Upgrading to Java 7 on Linux
- J2EE Sessions in CF10 Uses Secure Cookies
- Learn about ColdFusion Security at cfObjective 2013
- Session Loss and Session Fixation in ColdFusion
- FuseGuard 2.3 Released
- CKEditor Spell Checker Plugin
- Adobe Says Go Ahead and Upgrade your ColdFusion JVM


add to del.icio.us


