diff --git a/resources/scripts/wm-typeahead.js b/resources/scripts/wm-typeahead.js index d409c743..2a5f8d20 100644 --- a/resources/scripts/wm-typeahead.js +++ b/resources/scripts/wm-typeahead.js @@ -205,13 +205,10 @@ window.WMTypeAhead = function(appendTo, searchInput) { // eslint-disable-line no script = document.createElement('script'); script.id = 'api_opensearch'; - console.log("Created API script"); - // Removed description prop // TODO: Use text extract or PCS for description callbackIndex = window.callbackStack.addCallback(window.portalOpensearchCallback); - console.log("Called callback index"); searchQuery = { action: 'query', @@ -231,8 +228,6 @@ window.WMTypeAhead = function(appendTo, searchInput) { // eslint-disable-line no script.src = hostname + serialize(searchQuery); docHead.appendChild(script); - - console.log("Query script loaded"); } // END loadQueryScript @@ -287,8 +282,6 @@ window.WMTypeAhead = function(appendTo, searchInput) { // eslint-disable-line no pageDescription = '', i; - console.log("Called Template String"); - for (i = 0; i < suggestions.length; i++) { if (!suggestions[i]) { @@ -402,42 +395,24 @@ window.WMTypeAhead = function(appendTo, searchInput) { // eslint-disable-line no templateDOMString, listEl; - console.log("Defined vars in OpensearchCallback"); - return function(xhrResults) { - console.log("Returned xhrResults"); - window.callbackStack.deletePrevCallbacks(callbackIndex); - console.log("Deleted Prev Callbacks"); - if (document.activeElement !== searchEl) { - - console.log("Not search El"); - console.log(searchEl); - return; } - console.log("Yes search El"); - suggestions = (xhrResults.query && xhrResults.query.pages) ? xhrResults.query.pages : []; - console.log("before item in suggestions"); - for (item in suggestions) { result = suggestions[item]; orderedResults[result.index - 1] = result; } - console.log("after item in suggestions"); - templateDOMString = generateTemplateString(orderedResults); - console.log("Generated Template String"); - ssActiveIndex.setMax(orderedResults.length); ssActiveIndex.clear(); @@ -452,8 +427,6 @@ window.WMTypeAhead = function(appendTo, searchInput) { // eslint-disable-line no addEvent(listEl, 'mouseenter', toggleActiveClass.bind(this, listEl, typeAheadItems)); addEvent(listEl, 'mouseleave', toggleActiveClass.bind(this, listEl, typeAheadItems)); } - - console.log("Added mouse events"); }; }; diff --git a/skin.json b/skin.json index 2a185713..e2a74649 100644 --- a/skin.json +++ b/skin.json @@ -13,8 +13,8 @@ }, "config": { "CitizenThemeColor": "#11151d", - "CitizenEnablePreconnect": true, - "CitizenPreconnectOrigin": "https://www.google-analytics.com", + "CitizenEnablePreconnect": false, + "CitizenPreconnectOrigin": "", "CitizenEnableManifest": true, "CitizenManifestThemeColor": "#11151d", "CitizenManifestBackgroundColor": "#fff"