Skip to content

Instantly share code, notes, and snippets.

@jeffsheets
Created June 26, 2012 16:13
Show Gist options
  • Save jeffsheets/2996777 to your computer and use it in GitHub Desktop.
Save jeffsheets/2996777 to your computer and use it in GitHub Desktop.
jQuery Plugin to disable MS Lync Phone Number detection
/*
The IE Microsoft Lync Plugin puts an icon next to all phone numbers in the html markup.
This causes page layouts to break, especially with scrolling table plugins.
The icon is also included in printouts.
This disableMSLync plugin hides phone numbers from MS Lync by replacing the normal hyphen
with the non-breaking hyphen character code.
*/
/* Hide phone numbers from MS Lync plugin */
/* by using non-breaking hyphens */
/* usage: $('.phone').disableMSLync(); */
jQuery.fn.disableMSLync = function() {
return this.each(function(){
this.innerHTML = this.innerHTML.replace(/-/g,"‑");
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment