Fix code bugs introduced by the 3.0.1 upgrade.

- Use a different object notation in newtab.ts to stop nagging.
- Remove unused function from src/keyseq.ts.
This commit is contained in:
Anton Vilhelm Ásgeirsson 2018-08-19 11:31:54 +00:00
parent 77f6008259
commit 0192fecfe2
2 changed files with 2 additions and 7 deletions

View file

@ -300,11 +300,6 @@ export function mapstrMapToKeyMap(mapstrMap: Map<string, MapTarget>): KeyMap {
return newKeyMap return newKeyMap
} }
export function mapstrObjToKeyMap(mapstrObj): KeyMap {
const mapstrMap = new Map(Object.entries(mapstrObj))
return mapstrMapToKeyMap(mapstrMap)
}
// }}} // }}}
// {{{ Utility functions for dealing with KeyboardEvents // {{{ Utility functions for dealing with KeyboardEvents

View file

@ -10,7 +10,7 @@ function getChangelogDiv() {
function updateChangelogStatus() { function updateChangelogStatus() {
const changelogDiv = getChangelogDiv() const changelogDiv = getChangelogDiv()
const changelogContent = changelogDiv.textContent const changelogContent = changelogDiv.textContent
if (localStorage.changelogContent == changelogContent) { if (localStorage["changelogContent"] == changelogContent) {
const changelogButton = document.querySelector('input[id^="spoiler"]') const changelogButton = document.querySelector('input[id^="spoiler"]')
if (!changelogButton) { if (!changelogButton) {
console.error("Couldn't find changelog button!") console.error("Couldn't find changelog button!")
@ -22,7 +22,7 @@ function updateChangelogStatus() {
function readChangelog() { function readChangelog() {
const changelogDiv = getChangelogDiv() const changelogDiv = getChangelogDiv()
localStorage.changelogContent = changelogDiv.textContent localStorage["changelogContent"] = changelogDiv.textContent
updateChangelogStatus() updateChangelogStatus()
} }