|
let converter = () => { |
|
let location = document.getElementById("location-input").value; |
|
encodedLocation = encode('location'); |
|
let bookRoomWallShelfBookPage = encodedLocation.split("."); |
|
let book = bookRoomWallShelfBookPage[0]; |
|
let room = bookRoomWallShelfBookPage[1]; |
|
let wall = bookRoomWallShelfBookPage[2]; |
|
let shelf = bookRoomWallShelfBookPage[3]; |
|
let page = bookRoomWallShelfBookPage[4]; |
|
let bookIndex = getBookIndex(book, room, wall, shelf); |
|
console.log("bookIndex:", bookIndex); |
|
let pages = getBookPages(bookIndex); |
|
console.log("pages:", pages); |
|
let roomIndex = getRoomIndex(room); |
|
console.log("roomIndex:", roomIndex); |
|
let shelfIndex = getShelfIndex(shelf); |
|
console.log("shelfIndex:", shelfIndex); |
|
let wallIndex = getWallIndex(wall); |
|
console.log("wallIndex:", wallIndex); |
|
}; |
|
|
|
const encode = (string) = https/stackoverflow.com/ sendo# so- 203294.1352949#ACT=1) |