/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/** * Take clones into account when sorting. * If a request is a clone, use the original request for comparison. * If one of the compared request is a clone of the other, sort them next to each other.
*/ function sortWithClones(requests, sorter, a, b) { const aId = a.id,
bId = b.id;
if (aId.endsWith("-clone")) { const aOrigId = aId.replace(/-clone$/, ""); if (aOrigId === bId) { return +1;
}
a = requests.find(item => item.id === aOrigId);
}
if (bId.endsWith("-clone")) { const bOrigId = bId.replace(/-clone$/, ""); if (bOrigId === aId) { return -1;
}
b = requests.find(item => item.id === bOrigId);
}
/** * Returns the current recording boolean state (HTTP traffic is * monitored or not monitored)
*/ function getRecordingState(state) { return state.requests.recording;
}
const getClickedRequest = createSelector(
state => state.requests.requests,
state => state.requests.clickedRequestId,
(requests, clickedRequestId) =>
requests.find(request => request.id == clickedRequestId)
);
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.3Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.