diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 6b1e0cc7a5611..5f6547e2215ce 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -33,3 +33,4 @@ images: [ 'us.gcr.io/$PROJECT_ID/$REPO_NAME:latest', 'us.gcr.io/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA', ] +timeout: 20m diff --git a/src/_js/lib/Search.js b/src/_js/lib/Search.js index f3e2b5282796f..d82ea6a763253 100644 --- a/src/_js/lib/Search.js +++ b/src/_js/lib/Search.js @@ -24,8 +24,9 @@ const renderResult = function(data) { const renderResults = function(results, query) { const $results = $('[data-search-results]').clone(); - if (!results.length) { - $results.append(`

No results matching "${query}"

`); + if (!results || !results.length) { + const msg = `No results${!!results ? ` matching "${query}"` : ''}`; + $results.append(`

${msg}

`); } $.each(results, function(i, result) { $results.append(renderResult(result)); @@ -53,8 +54,11 @@ class Search { init() { const params = qs.parse(location.search); - if (!params.q) return Promise.resolve(); - + if (!params.q) { + return Promise.resolve().then(() => { + $('[data-search-results]').append(renderResults()); + }); + } $('input[name="q"]').val(params.q); return this.Lunr.search(params.q).then(results => { diff --git a/src/_js/lib/Trackers.js b/src/_js/lib/Trackers.js index 5ea2e69bc7eda..32c5d8e4dc4a0 100644 --- a/src/_js/lib/Trackers.js +++ b/src/_js/lib/Trackers.js @@ -1,26 +1,3 @@ -export const twitter = function() { - const img1 = document.createElement('img'); - img1.src = - 'https://analytics.twitter.com/i/adsct?txn_id=nydby&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0'; - img1.setAttribute('height', '1'); - img1.setAttribute('width', '1'); - img1.setAttribute('style', 'display:none;'); - img1.setAttribute('alt', ''); - img1.setAttribute('aria-hidden', 'true'); - - const img2 = document.createElement('img'); - img2.src = - '//t.co/i/adsct?txn_id=nydby&p_id=Twitter&tw_sale_amount=0&tw_order_quantity=0'; - img2.setAttribute('height', '1'); - img2.setAttribute('width', '1'); - img2.setAttribute('style', 'display:none;'); - img2.setAttribute('alt', ''); - img2.setAttribute('aria-hidden', 'true'); - - document.body.appendChild(img1); - document.body.appendChild(img2); -}; - export const facebook = function() { const img = document.createElement('img'); img.src = @@ -33,37 +10,6 @@ export const facebook = function() { document.body.appendChild(img); }; -export const linkedin = function() { - window._linkedin_data_partner_id = '107517'; - const s = document.getElementsByTagName('script')[0]; - const b = document.createElement('script'); - b.type = 'text/javascript'; - b.async = true; - b.src = 'https://snap.licdn.com/li.lms-analytics/insight.min.js'; - s.parentNode.insertBefore(b, s); -}; - -export const bing = function() { - (function(w, d, t, r, u) { - var f, n, i; - (w[u] = w[u] || []), - (f = function() { - var o = { ti: '5751143' }; - (o.q = w[u]), (w[u] = new UET(o)), w[u].push('pageLoad'); - }), - (n = d.createElement(t)), - (n.src = r), - (n.async = 1), - (n.onload = n.onreadystatechange = function() { - var s = this.readyState; - (s && s !== 'loaded' && s !== 'complete') || - (f(), (n.onload = n.onreadystatechange = null)); - }), - (i = d.getElementsByTagName(t)[0]), - i.parentNode.insertBefore(n, i); - })(window, document, 'script', '//bat.bing.com/bat.js', 'uetq'); -}; - export const hubspot = function() { const script = document.createElement('script'); script.setAttribute('src', '//js.hs-scripts.com/3344477.js'); diff --git a/src/_js/lib/Tracking.js b/src/_js/lib/Tracking.js index 6c901ce9e3845..47754bd2850c0 100644 --- a/src/_js/lib/Tracking.js +++ b/src/_js/lib/Tracking.js @@ -4,10 +4,7 @@ const init = function() { const namespace = 'trackersOk'; loadIfTrackersOk.push(google); - loadIfTrackersOk.push(twitter); loadIfTrackersOk.push(facebook); - loadIfTrackersOk.push(linkedin); - loadIfTrackersOk.push(bing); loadIfTrackersOk.push(hubspot); // If we've been given permission to track, set a cookie that we can check diff --git a/src/_layouts/doc.html b/src/_layouts/doc.html index 86a2e78e22cc0..4a1f60215c6a1 100644 --- a/src/_layouts/doc.html +++ b/src/_layouts/doc.html @@ -4,7 +4,7 @@
-