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:
parent
a1dba1d4a1
commit
f96930d1a7
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue