Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
// no baseURI
|
||||
|
||||
// object to store loaded and loading chunks
|
||||
// undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
||||
var installedChunks = {
|
||||
792: 0
|
||||
};
|
||||
|
||||
__webpack_require__.f.j = (chunkId, promises) => {
|
||||
// JSONP chunk loading for javascript
|
||||
var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
||||
if(installedChunkData !== 0) { // 0 means "already installed".
|
||||
|
||||
// a Promise means "currently loading".
|
||||
if(installedChunkData) {
|
||||
promises.push(installedChunkData[2]);
|
||||
} else {
|
||||
if(true) { // all chunks have JS
|
||||
// setup Promise in chunk cache
|
||||
var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
||||
promises.push(installedChunkData[2] = promise);
|
||||
|
||||
// start chunk loading
|
||||
var url = __webpack_require__.p + __webpack_require__.u(chunkId);
|
||||
// create error before stack unwound to get useful stacktrace later
|
||||
var error = new Error();
|
||||
var loadingEnded = (event) => {
|
||||
if(__webpack_require__.o(installedChunks, chunkId)) {
|
||||
installedChunkData = installedChunks[chunkId];
|
||||
if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
||||
if(installedChunkData) {
|
||||
var errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
||||
var realSrc = event && event.target && event.target.src;
|
||||
error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
||||
error.name = 'ChunkLoadError';
|
||||
error.type = errorType;
|
||||
error.request = realSrc;
|
||||
installedChunkData[1](error);
|
||||
}
|
||||
}
|
||||
};
|
||||
__webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// no prefetching
|
||||
|
||||
// no preloaded
|
||||
|
||||
// no HMR
|
||||
|
||||
// no HMR manifest
|
||||
|
||||
// no on chunks loaded
|
||||
|
||||
// install a JSONP callback for chunk loading
|
||||
var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
||||
var chunkIds = data[0];
|
||||
var moreModules = data[1];
|
||||
var runtime = data[2];
|
||||
// add "moreModules" to the modules object,
|
||||
// then flag all "chunkIds" as loaded and fire callback
|
||||
var moduleId, chunkId, i = 0;
|
||||
if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
||||
for(moduleId in moreModules) {
|
||||
if(__webpack_require__.o(moreModules, moduleId)) {
|
||||
__webpack_require__.m[moduleId] = moreModules[moduleId];
|
||||
}
|
||||
}
|
||||
if(runtime) var result = runtime(__webpack_require__);
|
||||
}
|
||||
if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
||||
for(;i < chunkIds.length; i++) {
|
||||
chunkId = chunkIds[i];
|
||||
if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
installedChunks[chunkId][0]();
|
||||
}
|
||||
installedChunks[chunkId] = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var chunkLoadingGlobal = self["webpackChunk_dndbeyond_character_app"] = self["webpackChunk_dndbeyond_character_app"] || [];
|
||||
chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
||||
chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
||||
Reference in New Issue
Block a user