-
Notifications
You must be signed in to change notification settings - Fork 58
Development
# Move to the chrome directory within your Firefox profile
cd path_to_profile/chrome
# Clone this repository to a folder titled ShadowFox
git clone https://github.com/overdodactyl/ShadowFox ShadowFox
ShadowFox is designed with modularity in mind. Each tweak is contained within it's own file. The basic project structure is shown below:
-
userChrome-files
: contains all userChrome tweaks -
userContent-files
: contains all userContent tweaks-
about_pages
: files corresponding toabout:
about pages -
webextension-tweaks
: files corresponding to webextensions -
webpages
: files for webpages
-
If you are going to modify ShadowFox files, I recommend making changes to these corresponding files.
Within the root directory of the repository, there exists userChrome_imports.css
and userContent_imports.css
.
As opposed to userChrome.css
and userContent.css
, these files simply contain @import
statements for all the tweaks in the repository. This can therefore be used to prevent specific tweaks from being used (by deleting or commenting out the corresponding lines), or to load any changes you have made to the repository.
If you used the methods suggested above, you will want to add
@import "ShadowFox/userChrome_imports.css";
to the top of your userChrome.css
file located directly in you chrome
folder. Similarly,
@import "ShadowFox/userContent_imports.css";
to the top of your userContent.css
file located directly in you chrome
folder.
Important: A current bug in Firefox prevents the proper use of @import
statements for some Linux users. If this is the case, you will have to use gulp
to concatenate .css
after any modifications made or to specify which tweaks are used. Please see below.
Other users may be interested in using gulp as well as having a single userChrome/Content.css
file may result in a slightly faster loading time.
-
Install node.js
-
git clone https://github.com/overdodactyl/ShadowFox
-
Install the Gulp CLI
npm install -g gulp-cli
-
Install gulp and gulp-concat-css
npm install --save-dev gulp gulp-concat-css
-
Run a gulp task predefined in
gulpfile.js
, or create your own.- ex:
gulp userContent_all
- The following task writes
color_variables.css
,all_about_pages.css
and all css files in theuserContent-files
directory, in that order, to a file calleduserContent.css
in the root directory.
- ex:
/* Add everything to userContent */
gulp.task('userContent_all', function() {
return gulp.src(['color_variables.css', 'userContent-files/all_about_pages.css', 'userContent-files/*/*.css'])
.pipe(concatCss('userContent.css'))
.pipe(gulp.dest('.'));
});