Interactive interface for browsing global, full-resolution satellite imagery
remove loadDelay param
Jason Kentb198bfc8e6de
diff --git a/doc/testing.md b/doc/testing.mdindex 8b724c547..0af699472 100644--- a/doc/testing.md+++ b/doc/testing.md@@ -74,7 +74,6 @@ To run tests for both browsers in sequence: `npm run e2e`.| `mockSources` | String | *`20170530`* | Use the static JSON file with sources feeds found at mock/sources\_data.json-X || `mockAlerts` | string | *`alert`*, *`message`*, *`outage`*, *`no_types`*, or *`all_types`* | Use a static JSON file by passing the notification type. Local sources can be found at mock/notify_{string}.json || `modalView` | string | *`categories`*, *`measurements`*, or *`layers`* | Forces the 'Add Layers' modal to display categories, measurements, or layers. By default Artic/Antarctic shows measurements and Geographic shows categories. |-| `loadDelay` | ms | *`N`* | After loading all resources, wait X milliseconds before starting. || `now` | date | *`YYYY-MM-DDThh:mm:ssZ`* | Overrides the current date and time. This only works when using the `now()` function from `js/util/util.js`. || `showError` | boolean | *`true` or `false`* | If any value is specified, an error dialog will be shown on startup. || `showSubdaily` | boolean | *`true` or `false`* | If any value is specified, the hour input, minute input and "minutes" timeline zoom option will be shown. |diff --git a/web/js/debug.js b/web/js/debug.jsindex b0689c790..d12214d5b 100644--- a/web/js/debug.js+++ b/web/js/debug.js@@ -1,66 +1,8 @@import lodashEach from 'lodash/each';import lodashIsNaN from 'lodash/isNaN';import lodashParseInt from 'lodash/parseInt';-import util from './util/util';--export const debug = (function() {- const parameters = util.fromQueryString(window.location.search);- const self = {};-- const init = function() {- if (parameters.loadDelay) {- let delay;- try {- delay = parseInt(parameters.loadDelay, 10);- self.loadDelay(delay);- } catch (error) {- console.warn(`Invalid load delay: ${delay}`);- }- }- };-- const delayedCallback = function(jqXHR, wrap, delay) {- return function(fn) {- wrap((...args) => {- setTimeout(() => {- if (fn) {- fn.apply(jqXHR, args);- }- }, delay);- });- return jqXHR;- };- };-- self.loadDelay = function(delay) {- const { ajax } = $;- $.ajax = function(...ajaxArgs) {- console.log('delay', delay, ajaxArgs);- const jqXHR = ajax.apply($, ajaxArgs);-- const { done } = jqXHR;- jqXHR.done = delayedCallback(jqXHR, done, delay);- jqXHR.done(() => {- console.log('done', ajaxArgs);- });-- const { fail } = jqXHR;- jqXHR.fail = delayedCallback(jqXHR, fail, delay);- jqXHR.fail(() => {- console.log('fail', ajaxArgs);- });-- const { always } = jqXHR;- jqXHR.always = delayedCallback(jqXHR, always, delay);-- return jqXHR;- };- };-- init();- return self;-}());+// eslint-disable-next-line import/prefer-default-exportexport function debugConfig(config) {if (config.parameters.debug === 'tiles') {const tileSize = lodashParseInt(config.parameters.tileSize);