|
180 | 180 | <div id="controls"> |
181 | 181 | <button class="btn" id="downloadBin">Download .bin</button> |
182 | 182 | <!-- <button class="btn" id="downloadFlipper">Download Flipper .nfc</button> --> |
183 | | - <button class="btn" id="downloadMap">Download address map (.csv)</button> |
| 183 | + <!-- <button class="btn" id="downloadMap">Download address map (.csv)</button> --> |
184 | 184 | <button class="btn" id="writeWebNFC" disabled>Write via Web NFC</button> |
185 | 185 | <button class="btn btn--warning" id="loadFileBtn">Load File</button> |
186 | 186 | <button class="btn btn--warning" id="readWebNFC" disabled> |
|
794 | 794 | downloadBin(buf, `${filename}.bin`); |
795 | 795 | } |
796 | 796 | }; |
797 | | - document.getElementById("downloadMap").onclick = () => { |
798 | | - if (!checkMissing()) { |
799 | | - downloadMap(rows, `${filename}_map.csv`); |
800 | | - } |
801 | | - }; |
| 797 | + // document.getElementById("downloadMap").onclick = () => { |
| 798 | + // if (!checkMissing()) { |
| 799 | + // downloadMap(rows, `${filename}_map.csv`); |
| 800 | + // } |
| 801 | + // }; |
802 | 802 | // document.getElementById("downloadFlipper").onclick = () => { |
803 | 803 | // if (!checkMissing()) { |
804 | 804 | // downloadFlipperNfc(buf, start, `${filename}.nfc`); |
|
1257 | 1257 | const f = e.target.files?.[0]; |
1258 | 1258 | if (!f) return; |
1259 | 1259 | try { |
1260 | | - if (f.name.toLowerCase().endsWith(".bin")) { |
1261 | | - const buf = await f.arrayBuffer(); |
1262 | | - msg("Loaded .bin"); |
1263 | | - loadBufferIntoForm(buf, 0x00); |
1264 | | - } else { |
1265 | | - const text = await f.text(); |
1266 | | - const { startAddr, data } = parseBytesFromText(text); |
1267 | | - msg(`Loaded dump (start ${addrHex(startAddr)})`); |
1268 | | - loadBufferIntoForm(data, startAddr); |
1269 | | - } |
| 1260 | + const buf = await f.arrayBuffer(); |
| 1261 | + msg("Loaded .bin file"); |
| 1262 | + loadBufferIntoForm(buf, 0x00); |
1270 | 1263 | } catch (err) { |
1271 | 1264 | msg("Import error: " + err.message, true); |
1272 | 1265 | } finally { |
|
0 commit comments