Skip to content

Commit

Permalink
add UserCSS css
Browse files Browse the repository at this point in the history
  • Loading branch information
sijad committed Mar 23, 2019
1 parent d6700ef commit 1949c94
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
14 changes: 11 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const fs = require("fs");
const parseCss = require("css").parse;
const { version } = require("./package.json");

//const colorRegex = /#(?:[0-9a-fA-F]{3}){1,2}/g;
const colorRegex = /(#([0-9a-f]{3}){1,2}|(rgba|hsla)\(\d{1,3}%?(,\s?\d{1,3}%?){2},\s?(1|0?\.\d+)\)|(rgb|hsl)\(\d{1,3}%?(,\s?\d{1,3}%?\)){2})/gi;
Expand Down Expand Up @@ -70,8 +71,15 @@ fs.readdir("css-files", (err, files) => {
}

if (!err && files && files.length) {
let output = '@-moz-document url-prefix("https://hackerone.com") {';
output += manualCss;
let output = `/* ==UserStyle==
@name HackerOne Dark
@namespace https://github.com/sijad/hackerone-dark
@version ${version}
@license MIT
==/UserStyle== */
@-moz-document url-prefix("https://hackerone.com") {
${manualCss}`;

files
.filter(file => file.indexOf(".") !== 0)
Expand All @@ -81,7 +89,7 @@ fs.readdir("css-files", (err, files) => {

output += "}";

fs.writeFileSync("hackerone-dark.css", output);
fs.writeFileSync("hackerone-dark.user.css", output);
}
});

Expand Down
8 changes: 8 additions & 0 deletions hackerone-dark.css → hackerone-dark.user.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
/* ==UserStyle==
@name HackerOne Dark
@namespace https://github.com/sijad/hackerone-dark
@version 0.0.1
@license MIT
==/UserStyle== */

@-moz-document url-prefix("https://hackerone.com") {

.loading-indicator__inner {
border-color: rgb(33, 107, 165) transparent transparent rgb(33, 107, 165) !important;
}
Expand Down

0 comments on commit 1949c94

Please sign in to comment.