I solved this by copying the structure of a jQuery dependency in resources/Resources.php with the resource I wanted to include and uploaded the .js file to the specified folder.
Then added the following code to LocalSettings.php:
$wgHooks['BeforePageDisplay'][] = function( OutputPage &$out, Skin &$skin ) {
$out->addModules('mymodule');
return true;
};