Skip to content

Commit

Permalink
Fixed dependencies version, updated TinyMCE, added config for code hi…
Browse files Browse the repository at this point in the history
…ghlight
  • Loading branch information
GendelfLugansk committed May 6, 2020
1 parent accbac3 commit 3813c8c
Show file tree
Hide file tree
Showing 88 changed files with 2,729 additions and 2,593 deletions.
14 changes: 11 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@
},
"homepage": "https://github.com/GendelfLugansk/dou-enhancer#readme",
"devDependencies": {
"@babel/core": "^7.0.0-beta.38",
"@babel/preset-env": "^7.0.0-beta.38",
"babel-core": "^7.0.0-beta.3",
"del": "^3.0.0",
"domify": "^1.4.0",
"eslint": "^4.14.0",
"font-awesome": "^4.7.0",
"gulp": "^3.9.1",
"@babel/core": "7.5.5",
"@babel/preset-env": "7.5.5",
"babel-core": "7.0.0-bridge.0",
"del": "3.0.0",
"domify": "1.4.0",
"eslint": "4.19.1",
"font-awesome": "4.7.0",
"gulp": "3.9.1",
"gulp-babel": "8.0.0",
"gulp-eslint": "^4.0.0",
"gulp-sass": "^3.1.0",
"gulp-sequence": "^1.0.0",
"gulp-zip": "^4.1.0",
"sanitize-html": "^1.17.0",
"striptags": "^3.1.1",
"tinymce": "^4.7.4",
"gulp-eslint": "4.0.2",
"gulp-sass": "3.2.1",
"gulp-sequence": "1.0.0",
"gulp-zip": "4.2.0",
"sanitize-html": "1.20.1",
"striptags": "3.1.1",
"tinymce": "4.9.10",
"tinymce-emoji": "GendelfLugansk/tinymce-emoji#twemoji",
"twemoji": "^2.5.0",
"vinyl-named": "^1.1.0",
"webpack-stream": "^4.0.0"
"twemoji": "2.5.1",
"vinyl-named": "1.1.0",
"webpack-stream": "4.0.3"
}
}
1 change: 1 addition & 0 deletions src/config/extension-defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ export default {
{title: 'Не читал, осуждаю', description: 'Не читал, осуждаю', content: 'Не читал, но осуждаю'},
{title: 'Читал, осуждаю', description: 'Читал, осуждаю', content: 'Читал, но всё равно осуждаю'},
],
hljsTheme: 'agate'
};
81 changes: 81 additions & 0 deletions src/config/hljs-themes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
export default [
"agate",
"androidstudio",
"arduino-light",
"arta",
"ascetic",
"atelier-cave-dark",
"atelier-cave-light",
"atelier-dune-dark",
"atelier-dune-light",
"atelier-estuary-dark",
"atelier-estuary-light",
"atelier-forest-dark",
"atelier-forest-light",
"atelier-heath-dark",
"atelier-heath-light",
"atelier-lakeside-dark",
"atelier-lakeside-light",
"atelier-plateau-dark",
"atelier-plateau-light",
"atelier-savanna-dark",
"atelier-savanna-light",
"atelier-seaside-dark",
"atelier-seaside-light",
"atelier-sulphurpool-dark",
"atelier-sulphurpool-light",
"atom-one-dark",
"atom-one-light",
"brown-paper",
"codepen-embed",
"color-brewer",
"darcula",
"dark",
"darkula",
"default",
"docco",
"dracula",
"far",
"foundation",
"github",
"github-gist",
"googlecode",
"grayscale",
"gruvbox-dark",
"gruvbox-light",
"hopscotch",
"hybrid",
"idea",
"ir-black",
"kimbie.dark",
"kimbie.light",
"magula",
"mono-blue",
"monokai",
"monokai-sublime",
"obsidian",
"ocean",
"paraiso-dark",
"paraiso-light",
"pojoaque",
"purebasic",
"qtcreator_dark",
"qtcreator_light",
"railscasts",
"rainbow",
"routeros",
"school-book",
"solarized-dark",
"solarized-light",
"sunburst",
"tomorrow",
"tomorrow-night",
"tomorrow-night-blue",
"tomorrow-night-bright",
"tomorrow-night-eighties",
"vs",
"vs2015",
"xcode",
"xt256",
"zenburn"
];
6 changes: 3 additions & 3 deletions src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const fn = function () {
/**
* Highlight all code
*/
highlightCode();
highlightCode(extensionConfig);
/**
* Expand all threads
*/
Expand All @@ -310,7 +310,7 @@ const fn = function () {
commentsMutationCallbacks.push(function (added, edited) {
if (added || edited) {
addImagePreviews(extensionConfig);
highlightCode();
highlightCode(extensionConfig);
if (extensionConfig.expandThreads) {
expandThreads();
}
Expand All @@ -334,7 +334,7 @@ const fn = function () {
}

addImagePreviews(extensionConfig, true);
highlightCode();
highlightCode(extensionConfig);
if (extensionConfig.expandThreads) {
expandThreads();
}
Expand Down
4 changes: 2 additions & 2 deletions src/static/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "DOU enhancer",
"description": "Chrome extension that adds WYSIWYG editor (and more!) to dou.ua",
"version": "0.0.0.21",
"version": "0.0.0.22",
"icons": {
"128": "icon128.png"
},
Expand Down Expand Up @@ -50,7 +50,6 @@
"js/content.js"
],
"css": [
"vendor/highlightjs/styles/monokai.css",
"vendor/uikit/css/uikit.no-base.min.css",
"css/content.css"
]
Expand All @@ -60,6 +59,7 @@
"vendor/tinymce/plugins/*",
"vendor/tinymce/skins/*",
"vendor/tinymce/themes/*",
"vendor/highlightjs/styles/*",
"css/tinymce-content.css"
],
"options_page": "options.html"
Expand Down
7 changes: 7 additions & 0 deletions src/static/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ <h2 class="uk-text-center"><i class="fa fa-cogs" aria-hidden="true"></i> Config<
<input type="checkbox" class="uk-checkbox" id="twemoji">
</div>

<div class="uk-width-1-2@s">
<label class="uk-form-label" for="hljsTheme">Code highlight theme</label>
</div>
<div class="uk-width-1-2@s">
<select class="uk-select uk-form-width-small" id="hljsTheme"></select>
</div>

</form>

<p id="devOptionsExpander" class="dev-options-expander expanded"></p>
Expand Down
7 changes: 7 additions & 0 deletions src/static/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ <h2 class="uk-text-center"><i class="fa fa-cogs" aria-hidden="true"></i> Config<
<input type="checkbox" class="uk-checkbox" id="twemoji">
</div>

<div class="uk-width-1-2@s">
<label class="uk-form-label" for="hljsTheme">Code highlight theme</label>
</div>
<div class="uk-width-1-2@s">
<select class="uk-select uk-form-width-small" id="hljsTheme"></select>
</div>

<div class="uk-width-1-1\@s">
<a target="_blank" href="/options.html">All options</a>
</div>
Expand Down
72 changes: 36 additions & 36 deletions src/static/vendor/highlightjs/styles/agate.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,93 +16,93 @@
*
*/

.hljs, .b-typo pre.hljs-code-container code.hljs {
.b-typo pre.hljs-code-container code.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #333;
color: white;
}

.hljs-name,
.hljs-strong {
.b-typo pre.hljs-code-container code.hljs .hljs-name,
.b-typo pre.hljs-code-container code.hljs .hljs-strong {
font-weight: bold;
}

.hljs-code,
.hljs-emphasis {
.b-typo pre.hljs-code-container code.hljs .hljs-code,
.b-typo pre.hljs-code-container code.hljs .hljs-emphasis {
font-style: italic;
}

.hljs-tag {
.b-typo pre.hljs-code-container code.hljs .hljs-tag {
color: #62c8f3;
}

.hljs-variable,
.hljs-template-variable,
.hljs-selector-id,
.hljs-selector-class {
.b-typo pre.hljs-code-container code.hljs .hljs-variable,
.b-typo pre.hljs-code-container code.hljs .hljs-template-variable,
.b-typo pre.hljs-code-container code.hljs .hljs-selector-id,
.b-typo pre.hljs-code-container code.hljs .hljs-selector-class {
color: #ade5fc;
}

.hljs-string,
.hljs-bullet {
.b-typo pre.hljs-code-container code.hljs .hljs-string,
.b-typo pre.hljs-code-container code.hljs .hljs-bullet {
color: #a2fca2;
}

.hljs-type,
.hljs-title,
.hljs-section,
.hljs-attribute,
.hljs-quote,
.hljs-built_in,
.hljs-builtin-name {
.b-typo pre.hljs-code-container code.hljs .hljs-type,
.b-typo pre.hljs-code-container code.hljs .hljs-title,
.b-typo pre.hljs-code-container code.hljs .hljs-section,
.b-typo pre.hljs-code-container code.hljs .hljs-attribute,
.b-typo pre.hljs-code-container code.hljs .hljs-quote,
.b-typo pre.hljs-code-container code.hljs .hljs-built_in,
.b-typo pre.hljs-code-container code.hljs .hljs-builtin-name {
color: #ffa;
}

.hljs-number,
.hljs-symbol,
.hljs-bullet {
.b-typo pre.hljs-code-container code.hljs .hljs-number,
.b-typo pre.hljs-code-container code.hljs .hljs-symbol,
.b-typo pre.hljs-code-container code.hljs .hljs-bullet {
color: #d36363;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
.b-typo pre.hljs-code-container code.hljs .hljs-keyword,
.b-typo pre.hljs-code-container code.hljs .hljs-selector-tag,
.b-typo pre.hljs-code-container code.hljs .hljs-literal {
color: #fcc28c;
}

.hljs-comment,
.hljs-deletion,
.hljs-code {
.b-typo pre.hljs-code-container code.hljs .hljs-comment,
.b-typo pre.hljs-code-container code.hljs .hljs-deletion,
.b-typo pre.hljs-code-container code.hljs .hljs-code {
color: #888;
}

.hljs-regexp,
.hljs-link {
.b-typo pre.hljs-code-container code.hljs .hljs-regexp,
.b-typo pre.hljs-code-container code.hljs .hljs-link {
color: #c6b4f0;
}

.hljs-meta {
.b-typo pre.hljs-code-container code.hljs .hljs-meta {
color: #fc9b9b;
}

.hljs-deletion {
.b-typo pre.hljs-code-container code.hljs .hljs-deletion {
background-color: #fc9b9b;
color: #333;
}

.hljs-addition {
.b-typo pre.hljs-code-container code.hljs .hljs-addition {
background-color: #a2fca2;
color: #333;
}

.hljs a {
.b-typo pre.hljs-code-container code.hljs .hljs a {
color: inherit;
}

.hljs a:focus,
.hljs a:hover {
.b-typo pre.hljs-code-container code.hljs .hljs a:focus,
.b-typo pre.hljs-code-container code.hljs .hljs a:hover {
color: inherit;
text-decoration: underline;
}
Loading

0 comments on commit 3813c8c

Please sign in to comment.