diff --git a/script/single.js b/script/single.js index 5214d41..aeaf9b7 100644 --- a/script/single.js +++ b/script/single.js @@ -1,5 +1,7 @@ 'use strict'; +(function() { + function defined(x) { return x !== null && typeof x !== 'undefined'; } @@ -53,4 +55,6 @@ function setup() { } } -window.onload = setup; +window.addEventListener('load', setup); + +})();