Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
fix bug 759546 - IOS bug menu fix
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing authored and cvan committed Jun 18, 2012
1 parent dd8e266 commit 4f30207
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
20 changes: 11 additions & 9 deletions media/js/lib/stick.js
Expand Up @@ -11,7 +11,7 @@ var perf = window.performance || window.msPerformance ||
window.webkitPerformance || window.mozPerformance;

var send = function(data) {
if (perf) {
if (z.capabilities.performance) {
var timings = $('body').attr('data-collect-timings');
if (timings) {
timings = timings.split(':', 2);
Expand All @@ -25,14 +25,16 @@ var send = function(data) {

exports.basic = function() {
/* Sends the timing data to the given URL */
send({
'window.performance.timing.navigationStart': perf.timing.navigationStart,
'window.performance.timing.domComplete': perf.timing.domComplete,
'window.performance.timing.domInteractive': perf.timing.domInteractive,
'window.performance.timing.domLoading': perf.timing.domLoading,
'window.performance.navigation.redirectCount': perf.navigation.redirectCount,
'window.performance.navigation.type': perf.navigation.type,
});
if (z.capabilities.performance) {
send({
'window.performance.timing.navigationStart': perf.timing.navigationStart,
'window.performance.timing.domComplete': perf.timing.domComplete,
'window.performance.timing.domInteractive': perf.timing.domInteractive,
'window.performance.timing.domLoading': perf.timing.domLoading,
'window.performance.navigation.redirectCount': perf.navigation.redirectCount,
'window.performance.navigation.type': perf.navigation.type,
});
}
};

exports.custom = function(data) {
Expand Down
3 changes: 2 additions & 1 deletion media/js/mkt/capabilities.js
Expand Up @@ -18,7 +18,8 @@ z.capabilities = {
'touch': ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,
'nativeScroll': (function() {
return 'WebkitOverflowScrolling' in document.createElement('div').style;
})()
})(),
'performance': !!(window.performance || window.msPerformance || window.webkitPerformance || window.mozPerformance)
};

if (z.capabilities.tablet) {
Expand Down

0 comments on commit 4f30207

Please sign in to comment.