UNPKG

epicwar

Version:
19 lines (18 loc) 571 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMapUrl = void 0; const epicwar_enum_1 = require("../../../epicwar.enum"); function getMapUrl(cells) { for (const cell of cells) { const urls = cell.getElementsByTagName('a'); for (const url of urls) { const { href } = url; if (!href.startsWith('/maps/download')) { continue; } return `${epicwar_enum_1.EpicwarEnum.BASE_URL}${href}`; } } return null; } exports.getMapUrl = getMapUrl;