initial commit

This commit is contained in:
AF 2021-01-30 19:03:14 +03:00
commit 0b334984d8
12 changed files with 210 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
png/.DS_Store

4
.prettierrc Normal file
View File

@ -0,0 +1,4 @@
{
"tabWidth": 4,
"useTabs": false
}

14
background.js Normal file
View File

@ -0,0 +1,14 @@
chrome.runtime.onInstalled.addListener(function () {
chrome.declarativeContent.onPageChanged.removeRules(undefined, function () {
chrome.declarativeContent.onPageChanged.addRules([
{
conditions: [
new chrome.declarativeContent.PageStateMatcher({
pageUrl: { hostEquals: "vk.com" },
}),
],
actions: [new chrome.declarativeContent.ShowPageAction()],
},
]);
});
});

137
css/vk.css Normal file
View File

@ -0,0 +1,137 @@
:root {
--azure_a100: #d8780a !important;
--black: white !important;
--black_alpha4: rgba(0, 0, 0, 0.04) !important;
--black_alpha8: rgba(0, 0, 0, 0.08) !important;
--black_alpha12: rgba(0, 0, 0, 0.12) !important;
--black_alpha16: rgba(0, 0, 0, 0.16) !important;
--black_alpha24: rgba(0, 0, 0, 0.24) !important;
--black_alpha36: rgba(0, 0, 0, 0.36) !important;
--black_alpha40: rgba(0, 0, 0, 0.4) !important;
--black_alpha48: rgba(0, 0, 0, 0.48) !important;
--black_alpha56: rgba(0, 0, 0, 0.56) !important;
--black_alpha72: rgba(0, 0, 0, 0.72) !important;
--black_alpha88: rgba(0, 0, 0, 0.88) !important;
--blue_400: #ae7e47 !important;
--blue_400_alpha20: rgba(174, 126, 71, 0.2) !important;
--blue_400_alpha48: rgba(174, 126, 71, 0.49) !important;
--blue_420: #b58957 !important;
--blue_600: #d5a77a !important;
--blue_640: #ddb485 !important;
--blue_800: #e2c5a3 !important;
--blue_980_alpha12: rgba(0, 20, 51, 0.12);
--blue_bright: #a36319 !important;
--gold_200: #f4e7c3;
--gold_250: #e3d3ac;
--gold_300: #d1c097;
--gold_400: #ab9871;
--gold_500: #857250;
--gray_20: #060606 !important;
--gray_40: #0a0a0a !important;
--gray_200: #333333 !important;
--gray_300: #4d4d4d !important;
--gray_400: #6c6c6c !important;
--gray_500: #7d7d7d !important;
--gray_600: #9a9a9a !important;
--gray_700: #aaaaaa !important;
--gray_800: #cccccc !important;
--gray_800_alpha72: rgba(204, 204, 204, 0.72) !important;
--gray_800_alpha88: rgba(204, 204, 204, 0.88) !important;
--gray_900: #dddddd !important;
--gray_900_alpha16: rgba(221, 221, 221, 0.16) !important;
--gray_900_alpha72: rgba(221, 221, 221, 0.72) !important;
--gray_900_alpha88: rgba(221, 221, 221, 0.88) !important;
--gray_960: #f5f5f5 !important;
--green_alpha16: rgba(75, 179, 75, 0.16);
--green_350: #4bb34b;
--green_400: #43a843;
--green_600: #1b7a1b;
--green_light: #def0d3;
--green_nice: #3dcc4b;
--light_blue_40: #1a140e !important;
--light_blue_40_alpha72: rgba(26, 20, 14, 0.72) !important;
--light_blue_80: #201912 !important;
--light_blue_100: #251d15 !important;
--light_blue_300: #614b37 !important;
--light_blue_400: #86694d !important;
--light_blue_500: #a8835e !important;
--light_blue_700: #ba9771 !important;
--light_blue_A300: #705237 !important;
--orange: #ffa000;
--orange_fire: #f05c44;
--orange_prominent: #ff724c;
--purple: #735ce6;
--purple_light: #937ff5;
--red: #e64646;
--red_alpha16: rgba(230, 70, 70, 0.16);
--red_alpha12: rgba(230, 70, 70, 0.12);
--red_dark: #db3b3b;
--red_light: #ffd6cc;
--red_nice: #ff3347;
--sky_60: #331600 !important;
--sky_80: #4d2100 !important;
--sky_100: #662c00 !important;
--sky_200: #8f3e00 !important;
--steel_gray_10: #050403 !important;
--steel_gray_20: #080705 !important;
--steel_gray_40: #0f0d0a !important;
--steel_gray_60: #12110f !important;
--steel_gray_80: #181713 !important;
--steel_gray_100: #231e19 !important;
--steel_gray_120: #2c2621 !important;
--steel_gray_140: #3a2f24 !important;
--steel_gray_200: #51483d !important;
--steel_gray_200_alpha12: rgba(81, 72, 61, 0.12) !important;
--steel_gray_300: #665d52 !important;
--steel_gray_400: #7e7366 !important;
--steel_gray_500: #90867a !important;
--steel_gray_540: #9d9285 !important;
--steel_gray_600: #b1a699 !important;
--steel_gray_A540: #aa9882 !important;
--steel_gray_A540_alpha64: rgba(170, 152, 130, 0.64) !important;
--transparent_black: rgba(255, 255, 255, 0) !important;
--transparent_white: rgba(0, 0, 0, 0) !important;
--turquoise: #63b9ba;
--violet: #792ec0;
--violet_dark: #1f1b2c;
--violet_light: #a393f5;
--violet_muted: #4b4d61;
--white: black !important;
--white_alpha72: rgba(0, 0, 0, 0.72) !important;
--white_alpha64: rgba(0, 0, 0, 0.64) !important;
--white_alpha40: rgba(0, 0, 0, 0.4) !important;
--white_alpha24: rgba(0, 0, 0, 0.24) !important;
--white_alpha16: rgba(0, 0, 0, 0.16) !important;
--white_alpha8: rgba(0, 0, 0, 0.08) !important;
--white_alpha4: rgba(0, 0, 0, 0.04) !important;
--white_blue20: #331b00 !important;
--white_blue32: #522c00 !important;
--yellow: #ffc107;
--yellow_light: #05102d !important;
--lavender_100: #191600 !important;
--lavender_200: #332c00 !important;
--lavender_300: #524700 !important;
--lavender_700: #a69a4c !important;
--lavender_800: #bfb67f !important;
--lavender_900: #d9d4b2 !important;
}
.im-page--dialogs-footer,
.im-navigation__button,
.im-page--dcontent,
.pv_narrow_column_wrap,
#layer_bg,
#pv_box,
.pv_cont,
.narrow_column {
background-color: #050505 !important;
}
.TopHomeLink--logoWithText,
.left_icon {
filter: invert(1);
}
.like_tt_header * {
color: #fff;
}

36
manifest.json Normal file
View File

@ -0,0 +1,36 @@
{
"name": "Dark CSS for VK",
"version": "1.0",
"description": "CSS-only dark themes. VK. More sites soon.",
"permissions": ["activeTab", "declarativeContent", "tabs", "activeTab"],
"background": {
"scripts": ["background.js"],
"persistent": false
},
"page_action": {
"default_popup": "popup.html",
"default_icon": {
"16": "png/icss16.png",
"32": "png/icss32.png",
"64": "png/icss64.png",
"128": "png/icss128.png",
"256": "png/icss256.png",
"512": "png/icss512.png"
}
},
"content_scripts": [
{
"matches": ["https://*.vk.com/*"],
"css": ["css/vk.css"]
}
],
"icons": {
"16": "png/icss16.png",
"32": "png/icss32.png",
"64": "png/icss64.png",
"128": "png/icss128.png",
"256": "png/icss256.png",
"512": "png/icss512.png"
},
"manifest_version": 2
}

BIN
png/icss128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
png/icss16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
png/icss256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
png/icss32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
png/icss512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
png/icss64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

18
popup.html Normal file
View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<style>
html {
background: black;
color: white;
}
body {
width: 200px;
}
</style>
</head>
<body>
Dark Theme enabled via plain CSS
</body>
</html>