Decouple skin settings from skin json to localsettings

This commit is contained in:
alistair3149 2019-12-11 19:54:24 -05:00
parent c466ed8314
commit 0c780cd470
2 changed files with 2 additions and 29 deletions

View file

@ -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");
};
};

View file

@ -13,8 +13,8 @@
},
"config": {
"CitizenThemeColor": "#11151d",
"CitizenEnablePreconnect": true,
"CitizenPreconnectOrigin": "https://www.google-analytics.com",
"CitizenEnablePreconnect": false,
"CitizenPreconnectOrigin": "",
"CitizenEnableManifest": true,
"CitizenManifestThemeColor": "#11151d",
"CitizenManifestBackgroundColor": "#fff"