Howto Remove Skype Plugin Markup with jQuery

May 03, 2010
web

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.


Like this? Follow me ↯


You might also like:

5 people found this page useful, what do you think?

Comments

Hey Pete, I have the plugin installed, but in Firefox I have a button in my toolbar that allows me to easily disable the feature, or even uninstall the plugin. Do you not have this button, or am I missing something?
@Thomas that's not really the issue, the problem is that when the plugin causes a layout problem. You don't want to leave it up to the user to fix it, I'd rather account for it on my end if I know it is going to happen.
The META tag did not work, but your script did the job! Many thanks!!! My vertical menu on the Theatre40.org web pages was messed up due to the phone number expansion with that damn country code (flag). I came THAT close to uninstalling Skype! Thanks again!
Superb, thanks for this -- works a treat!
I just used this CSS and it worked.

span.skype_pnh_container {
display:none !important;
}

span.skype_pnh_print_container {
display:inline !important;
}
try <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
@axiom - the meta tag doesn't work in all versions of skype from what I've read.
I would like to exchange links with your site www.petefreitag.com
Is this possible?
The reason I used 800 is because the markup is inserted slightly after the onload event is fired, I found that to be a good value to ensure that it was removed. You could run that code a few times at different intervals to ensure it is removed faster.
Hi Pete

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?
They actually do support a meta tag, https://cssmantra.wordpress.com/2010/06/14/stopping-skype-plugin-phone-number-mess-up-in-design/

<meta name=”SKYPE_TOOLBAR” content =”SKYPE_TOOLBAR_PARSER_COMPATIBLE”/>
Due to microsoft circumventing these fixes, this is the only thing that worked for me.

https://github.com/philios33/UndoSkype.jquery


Foundeo Inc.