Created
February 24, 2015 23:44
-
-
Save skynet/743c1310b20aee9f0cb1 to your computer and use it in GitHub Desktop.
Howto Remove Skype Plugin Markup with jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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 language="javascript"> | |
$(document).ready(function() { | |
window.setTimeout(function() { | |
$('.skype_pnh_container').html(''); | |
$('.skype_pnh_print_container').removeClass('skype_pnh_print_container'); | |
}, 800); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ht: Pete Freitag http://www.petefreitag.com/item/751.cfm