Bug 912184: use require() to load shared/js files
Merge pull request #11913 from wanderview/gallery-setup-require

Bug 912184: use require() to load shared/js files. r=djf