diff --git a/src/components/game.js b/src/components/game.js index e6bdd72..a65e4df 100644 --- a/src/components/game.js +++ b/src/components/game.js @@ -363,9 +363,12 @@ export class Game { const data = word.move.value const $index = document.createElement('span') $index.textContent = `${length - index}.` - const $word = document.createElement('span') + const $word = document.createElement('a') $word.classList.add(Game.ClassNames.Word, getClassName(Game.ClassNames.Word, 'match', data.match)) + $word.href = 'https://en.wiktionary.org/wiki/' + word.content + $word.target = '_blank' $word.textContent = word.content + $word.title = 'See definition' const $info = document.createElement('span') $info.classList.add(Game.ClassNames.WordInfo) $info.textContent = isPathfinderMode diff --git a/src/styles.css b/src/styles.css index fa609cb..a42a307 100644 --- a/src/styles.css +++ b/src/styles.css @@ -316,11 +316,6 @@ p.center { text-wrap: nowrap; } -#words .word { - margin: 0 0.5em; - text-transform: uppercase; -} - .buttons { grid-gap: 1em; margin: 1em 0; @@ -800,6 +795,13 @@ p.center { padding: 0.5em 1em; } +.word { + color: inherit; + margin: 0 0.5em; + text-transform: uppercase; + text-decoration: none; +} + .word-info { color: white; }