* 从 URL hash 应用课本 * @returns {Promise }
()
| 125 | * @returns {Promise<void>} |
| 126 | */ |
| 127 | async applyBookFromHash() { |
| 128 | const keyFromHash = location.hash.slice(1).trim(); |
| 129 | const storedBookKey = getStorage(this.config.STORAGE_KEYS.BOOK_SELECTION); |
| 130 | const initialBookKey = keyFromHash || storedBookKey || this.config.DEFAULT_BOOK_KEY; |
| 131 | await this.applyBookChange(initialBookKey); |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * 应用课本切换 |
no test coverage detected