Skip to content

Commit

Permalink
Prevent ios mobiles browser's DOM parser to transform numbers to tele…
Browse files Browse the repository at this point in the history
…phone number links.

Related to #75
  • Loading branch information
Kristian Sons committed Nov 18, 2014
1 parent 4ea0bbc commit 3f2f8da
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/xml3d.js
Expand Up @@ -13,6 +13,15 @@ XML3D._xml3d = document.createElementNS(XML3D.xml3dNS, "xml3d");
XML3D._native = !!XML3D._xml3d.style;
XML3D._parallel = XML3D._parallel != undefined ? XML3D._parallel : false;

(function () {
if (navigator.userAgent.match(/(iPad|iPhone|iPod touch)/i)) {
var m = document.createElement("meta");
m.name = "format-detection";
m.content = "telephone=no";
document.head.appendChild(m)
}
}());

XML3D.createElement = function(tagName) {
return document.createElementNS(XML3D.xml3dNS, tagName);
};
Expand Down

0 comments on commit 3f2f8da

Please sign in to comment.