Refactor main.js content
This merge request re-organizes some things in order to prepare the way for a more thorough refactoring of the main.js
script with the following goals:
- organize main.js actions for better maintainability
- reduce code footprint that is required on all pages
For now, all this does is:
- removes
dispatcher.js
and moves each of its methods into a more appropriate location (shortcuts setup, GFM autocomplete both go into./behaviors
and the rest all go directly intomain.js
. - moves all of the
shortcuts_*.js
files into./behaviors/shortcuts
- moves
findAndFollowLink
into./lib/utils
- moves
svg4everybody
into./polyfills
and reorganizes existing polyfills
I plan to refactor the Shortcuts
class and all of its sub-classes in a follow-up MR such that we do not need to maintain a black-list of pages with which to instantiate it.
Edited by Mike Greiling