* performance API and color changes on affilate page
This commit is contained in:
parent
31a0803019
commit
e9504b1fc6
|
|
@ -20,6 +20,8 @@
|
|||
var stun = null;
|
||||
var rest = context.JK.Rest();
|
||||
|
||||
$(window).on('load', sendTimingResults)
|
||||
$(window).on('pagehide', setNavigationStart)
|
||||
|
||||
$(document).on('JAMKAZAM_CONSTRUCTED', function(e, data) {
|
||||
|
||||
|
|
@ -245,4 +247,64 @@
|
|||
}
|
||||
}
|
||||
|
||||
function setNavigationStart() {
|
||||
if(!window.performance || !window.performance.timing) {
|
||||
try {
|
||||
window.sessionStorage.setItem('navigationStart', Date.now())
|
||||
}
|
||||
catch(e) {
|
||||
logger.debug("unable to accesss sessionStorage")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// http://githubengineering.com/browser-monitoring-for-github-com/
|
||||
function sendTimingResults() {
|
||||
setTimeout(function() {
|
||||
var timing;
|
||||
var hasTimingApi;
|
||||
|
||||
if(window.performance && window.performance.timing) {
|
||||
timing = window.performance.timing
|
||||
hasTimingApi = true;
|
||||
}
|
||||
else {
|
||||
timing = {}
|
||||
hasTimingApi = false;
|
||||
}
|
||||
|
||||
// Merge in simulated cross-browser load event
|
||||
timing['crossBrowserLoadEvent'] = Date.now()
|
||||
|
||||
var chromeFirstPaintTime;
|
||||
if(window.chrome && window.chrome.loadTimes) {
|
||||
var loadTimes = window.chrome.loadTimes()
|
||||
if(loadTimes) {
|
||||
chromeFirstPaintTime = true;
|
||||
}
|
||||
}
|
||||
|
||||
// firstPaintTime is in seconds; convert to milliseconds to match performance.timing.
|
||||
timing['chromeFirstPaintTime'] = Math.round(chromeFirstPaintTime * 1000);
|
||||
|
||||
// Merge in simulated navigation start, if no navigation timing
|
||||
if (!hasTimingApi) {
|
||||
try {
|
||||
var navStart = window.sessionStorage.getItem('navigationStart')
|
||||
if(navStart) {
|
||||
timing['simulatedNavigationStart'] = parseInt(navStart, 10)
|
||||
}
|
||||
}
|
||||
catch(e) { }
|
||||
}
|
||||
|
||||
|
||||
//GitHub.reportStats timing
|
||||
logger.debug("timing", timing)
|
||||
}, 0)
|
||||
|
||||
}
|
||||
|
||||
})(window, jQuery);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,11 @@
|
|||
body.web.landing_page.full {
|
||||
&.affiliate_program {
|
||||
|
||||
.video-container {
|
||||
width:100%;
|
||||
padding-bottom:53.33%;
|
||||
|
||||
}
|
||||
.agree-disagree-buttons {
|
||||
margin-top:30px;
|
||||
}
|
||||
|
|
@ -28,7 +33,9 @@ body.web.landing_page.full {
|
|||
|
||||
h1 {
|
||||
display: inline-block;
|
||||
margin-bottom:20px;
|
||||
}
|
||||
|
||||
.column {
|
||||
@include border_box_sizing;
|
||||
width:50% ! important;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
#partner-agreement-v1 {
|
||||
|
||||
background-color:#eee;
|
||||
* {
|
||||
color:#CCCCCC ! important;
|
||||
color:black! important;
|
||||
background-color:#eee;
|
||||
font-family: Raleway, Arial, Helvetica, sans-serif ! important;
|
||||
font-weight: 300 ! important;
|
||||
}
|
||||
|
||||
.c1, .c20 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue