epicwar
Version:
Epicwar.com maps download
17 lines (16 loc) • 478 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMapImage = void 0;
function getMapImage(cells) {
for (const cell of cells) {
const imgs = cell.getElementsByTagName('img');
for (const img of imgs) {
const { src } = img;
if (src.startsWith('//www.epicwar.com/assets/p')) {
return `https:${src}`;
}
}
}
return null;
}
exports.getMapImage = getMapImage;