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
- 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
- Uploading Files Like GMail Attachments - October 6, 2006
Trackbacks
Trackback Address: 751/D08C7BE39C691E8C18DB3CB30B2C5641
Comments
On 05/03/2010 at 4:57:45 PM EDT Thomas Messier wrote:
1
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?
On 05/04/2010 at 1:03:42 PM EDT Pete Freitag wrote:
2
@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.
On 05/10/2010 at 7:06:17 PM EDT Bernard Samstag wrote:
3
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!
On 06/01/2010 at 10:17:47 PM EDT john f wrote:
4
Thanks Pete. I searched everywhere for this solution. You've got me out of jail with this one.
On 06/02/2010 at 8:35:09 PM EDT Jonathan Schofield wrote:
5
Superb, thanks for this -- works a treat!
On 06/14/2010 at 9:20:51 AM EDT Krishna wrote:
6
Awesome, the time out is what I was missing! Many thanks!
On 06/25/2010 at 6:08:49 PM EDT Diodeus wrote:
7
I just used this CSS and it worked.
span.skype_pnh_container { display:none !important; }
span.skype_pnh_print_container { display:inline !important; }
On 08/19/2010 at 3:27:02 AM EDT axiom wrote:
8
try <meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />
On 08/19/2010 at 11:17:38 AM EDT Pete Freitag wrote:
9
@axiom - the meta tag doesn't work in all versions of skype from what I've read.
On 08/26/2010 at 7:19:15 AM EDT larvitard wrote:
10
thanks for this!!
Post a Comment
Recent Entries
- Howto Install and Run the Android Emulator
- jQuery UI Autocomple IE 6 Select List z-Index Issues
- Path Traversal Vulnerability Security Hotfix for ColdFusion Released
- Using AntiSamy with ColdFusion
- Writing Secure CFML Slides from CFUnited 2010
- Locking Down ColdFusion Presentation Slides
- Cross Domain Data Theft using CSS
- Using jQuery UI Autocomplete with Hidden ID's
span.skype_pnh_container { display:none !important; }
span.skype_pnh_print_container { display:inline !important; }


add to del.icio.us




