Issue #1555: Use function after definition

Fixes some `JSLint` inspection violations.

Description:
>JSLint: 'main' was used before it was defined.
This commit is contained in:
Michal Kordas 2015-08-30 00:28:03 +02:00 committed by Roman Ivanov
parent a1dba1d4a1
commit f96930d1a7
1 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,5 @@
'use strict';
window.addEventListener('load', main);
function main() {
var url = window.location.href;
var anchors = document.getElementsByTagName('h2');
@ -20,4 +18,6 @@ function main() {
anchors[i].appendChild(anchor);
}
}
}
window.addEventListener('load', main);