Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: #
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ["https://www.buymeacoffee.com/waymondrang"]
buy_me_a_coffee: waymondrang
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,7 @@ vite.config.ts.timestamp-*
test/
build/
release/
artifacts/
# artifacts/ is the web-ext output directory

.DS_Store
.DS_Store
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ A free and open-source browser extension for customizing the appearance of Googl
- Normal and midnight variants
- Vibrant light mode
- Customizable accent color
- Adjustable document background (unstable)
- Adjustable document background (unstable on Chromium browsers)
- Colorful and grayscale document invert (may affect images)
- Toggleable document border
- Quick toggle button (removable)
- Accessible settings popup
- Quick toggle button (removable)
- Non-destructive

### Quick toggle button

If enabled, click the button in the bottom-left corner of the screen to instantly enable/disable the extension for the current document.

Pressing this button only temporarily enables/disables the extension; to properly turn the extension off, use the settings popup. You can hide this toggle button in the settings popup.
Pressing this button will only temporarily enable/disable the extension; to properly turn the extension off, use the settings popup. You can hide this toggle button in the settings popup as well.

## Installation

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
},
"homepage": "https://docsafterdark.com/",
"scripts": {
"build": "webpack --mode=production && sass src/scss/docs.scss build/docs.bundle.css && sass src/scss/frame.scss build/frame.bundle.css && sass src/scss/global.scss build/global.bundle.css && web-ext lint --source-dir=build && ts-node package.ts",
"build": "webpack --mode=production && sass src/scss/docs.scss build/docs.bundle.css && sass src/scss/frame.scss build/frame.bundle.css && sass src/scss/global.scss build/global.bundle.css && web-ext lint --config=web-ext.config.mjs && ts-node package.ts",
"check": "prettier --check . && eslint src && stylelint '**/*.scss'",
"dev": "concurrently --names 'webpack,sass,sass,sass' --prefix-colors 'magenta,red,blue,yellow' 'webpack --watch' 'sass --watch src/scss/docs.scss build/docs.bundle.css' 'sass --watch src/scss/frame.scss build/frame.bundle.css' 'sass --watch src/scss/global.scss build/global.bundle.css'",
"firefox": "web-ext run --source-dir build/ --keep-profile-changes",
"firefox": "web-ext run --config=web-ext.config.mjs",
"fix:prettier": "prettier --write .",
"fix:stylelint": "stylelint '**/*.scss' --fix"
}
Expand Down
7 changes: 7 additions & 0 deletions web-ext.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
sourceDir: "build/",
artifactsDir: "artifacts/",
run: {
startUrl: ["about:debugging#/runtime/this-firefox"],
},
};
15 changes: 12 additions & 3 deletions webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ const { execSync } = require("child_process");
const fs = require("fs");

module.exports = (env, argv) => {
let commitHash = execSync("git rev-parse HEAD", {
encoding: "utf8",
}).trim();
// commitHash will fallback to 'unknown' when missing git or git history
let commitHash = "";
try {
commitHash = execSync("git rev-parse HEAD", {
encoding: "utf8",
}).trim();
} catch (error) {
commitHash = "unknown";
console.warn(
"git commit not available, using 'unknown' as commit hash. do not use this version in production!"
);
}

const packageJSON = JSON.parse(fs.readFileSync("package.json", "utf8"));

Expand Down