@theadmin: Sure, these instructions assume you are familiar with browser extension development.
The extension is a Vue+Vuex app. The vuex store is in src/store and contains the options set from the popup (what header size, which modules to hide, etc).
The vuex store is shared with the injected script, so it can read what options the user has set in the popup. See src/inject/App.vue for the injected script. At the top, it watches for changes in the config and does different things based on what options are selected.
A common thing that's done is adding a css class to the body, for example in line 24 of App.vue, if the user has selected the small header size, it adds the css class of gbt-emsmallen to the body.
Then, in the file headerSmall.scss, I have css set up to make the header smaller when that class is on the body.
Another thing App.vue might do is some DOM manipulation, when it is created. Look at the created() function on line 105. This js is run once when the page is loaded. Here I do things like clone the "Upcoming" box for the mini header, and make the homepage modules draggable.
Let me know if you have any other questions. The github README.md has instructions for running in dev mode. If you have familiarity with browser extension dev + Vue, you should be able to jump right in.
Log in to comment