Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/challenge-verify-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const i18n = require('electron').remote.getGlobal('i18n')
const userData = require(path.normalize(path.join(__dirname, 'user-data.js')))
const sidebarHandler = require(path.normalize(path.join(__dirname, 'challenge-sidebar-handler.js')))

const currentChallenge = window.currentChallenge
const currentChallenge = document.head.querySelector('meta[name="currentChallenge"]').getAttribute('content')
const verifyButton = document.getElementById('btn-verify-challenge')
const clearStatusButton = document.getElementById('btn-clear-challenge')
const verifyList = document.getElementById('verify-list')
Expand Down
7 changes: 1 addition & 6 deletions resources/layouts/challenge.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="utf-8">
<title>Git-it</title>
<meta name="currentChallenge" content="{{{ shortName }}}">
<link rel="stylesheet" href="../../assets/css/2-double-bounce.css">
<link rel="stylesheet" href="../../assets/css/new-style.css">
<link rel="stylesheet" href="../../assets/css/new-challenge.css">
Expand All @@ -20,12 +21,6 @@
</div>
</div>

<script>
// TODO Get this from the DOM and don't do template in JS
// currentChallenge still var, as it needs global scope to be used in challenge.js
var currentChallenge = '{{{ shortName }}}'
</script>

<script>require('../../lib/challenge-sidebar-handler.js')</script>
<script>require('../../lib/challenge-verify-handler.js')</script>
<script>require('../../lib/i18n-translate.js')</script>
Expand Down