Skip to content

Commit 58f9afc

Browse files
committed
CleanUp
1 parent e037f23 commit 58f9afc

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Assets/MainFunctions.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function preloadImage(url) {
238238
});
239239
}
240240

241-
// This can load a Script file into the current page. Works with a callback. The return needs to be executed on to launch the function in the script. See loadOneko for an example:
241+
// This can load a Script file into the current page. Works with a callback. The return needs to be executed on, to launch the function in the script. See loadOneko for an example:
242242
function loadScript(url, callback) {
243243
const script = document.createElement('script');
244244
script.src = url;
@@ -249,10 +249,8 @@ function loadScript(url, callback) {
249249
// Loads Oneko without being a Module or imported. This works with using a onload callback call to execute a method on. This is very VERY janky (This can be also be viewed as an example on how to use "loadScript"):
250250
function runOneko() {
251251
loadScript(onekoJsFile, function() {
252-
// Call the function after loading:
253-
if (typeof window.oneko === 'function') {
254-
window.oneko();
255-
}
252+
// Call function after loading:
253+
window.oneko();
256254
});
257255
}
258256

0 commit comments

Comments
 (0)