Pete Freitag Pete Freitag

Howto Remove Skype Plugin Markup with jQuery

Updated on December 13, 2024
By Pete Freitag
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="https://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.

Note, this entry uses jQuery 1.4.2 which is out of date. You'll want to take a look at the latest jQuery Security Vulnerabilities and make sure you version of jQuery is up to date.



skype jquery html javascript

Howto Remove Skype Plugin Markup with jQuery was first published on May 03, 2010.

If you like reading about skype, jquery, html, or javascript then you might also like:

Discuss / Follow me on Twitter ↯