Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Added Hide Higher chapters option (#14)
Browse files Browse the repository at this point in the history
Added Show full size cover option (#15)
Updated tooltip logic
Updated default colors
  • Loading branch information
Glagan committed Sep 11, 2019
1 parent b953eca commit 880e5de
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 52 deletions.
2 changes: 1 addition & 1 deletion build.js
Expand Up @@ -12,7 +12,7 @@ const [,, ...args] = process.argv;
let manifest = {
manifest_version: 2,
name: "MyMangaDex",
version: "2.2.3",
version: "2.3",
author: "Glagan",

description: "Automatically update your MyAnimeList manga list when reading on MangaDex.",
Expand Down
30 changes: 20 additions & 10 deletions css/mymangadex.css
Expand Up @@ -6,31 +6,41 @@
overflow: hidden;
background-color: rgba(0, 0, 0, 0.8);
opacity: 0;
transition: opacity 0.2s ease-in;
transition: opacity .2s ease-in;
color: #fff;
}

.mmd-loading {
display: none;
.mmd-tooltip.loading {
font-size: 1rem;
padding: .25rem;
}

.mmd-active {
.mmd-tooltip.active {
opacity: 1;
}

.mmd-tooltip-image {
.mmd-tooltip .mmd-thumbnail {
max-width: 100%;
user-select: none;
display: block;
}
.mmd-tooltip .mmd-thumbnail.loading {
display: none;
}
.mmd-tooltip.has-chapters .mmd-thumbnail {
border-bottom: 1px solid rgba(0, 0, 0, 0.6);
}

.mmd-tooltip-content {
display: inline-block;
padding: 4px;
}
.mmd-tooltip.loading .mmd-tooltip-content {
display: none;
}
.mmd-next-chapter {
color: rgb(199, 146, 2);
}

.mmd-ptr {
background-color: rgb(91, 192, 222) !important;
}

.mmd-background-info {
background-color: rgba(2, 136, 209, 0.2);
}
48 changes: 47 additions & 1 deletion options.html
Expand Up @@ -60,6 +60,28 @@ <h1 class="text-container py-2 px-2"><i class="fas fa-palette"></i> Colors</h1>
</div>
</div>
</div>
<div class="form-group text-container p-2">
<label class="font-weight-bold">Higher chapters color <a data-default="higherChaptersColor" class="btn btn-sm btn-secondary"><i
class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
<p class="d-none d-xl-block">Color used if <kbd>Hide higher chapters</kbd> is set to false.<br/>Set to <b>transparent</b> if you don't wish to highlight.</p>
<div class="input-group">
<input type="text" data-option="higherChaptersColor" data-type="text" data-color="true" class="form-control" />
<div class="input-group-append">
<span class="input-group-text" data-color="higherChaptersColor"></span>
</div>
</div>
</div>
<div class="form-group text-container p-2">
<label class="font-weight-bold">Next chapter color <a data-default="nextChapterColor" class="btn btn-sm btn-secondary"><i
class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
<p class="d-none d-xl-block">Color used to highlight the next chapter for a title.<br/>Set to <b>transparent</b> if you don't wish to highlight.</p>
<div class="input-group">
<input type="text" data-option="nextChapterColor" data-type="text" data-color="true" class="form-control" />
<div class="input-group-append">
<span class="input-group-text" data-color="nextChapterColor"></span>
</div>
</div>
</div>
<div class="form-group text-container p-2">
<label class="font-weight-bold">Opened chapters color <a data-default="openedChaptersColor" class="btn btn-sm btn-secondary"><i
class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
Expand Down Expand Up @@ -143,7 +165,7 @@ <h1 class="text-container py-2 px-2"><i class="fas fa-bookmark"></i> Chapters li
</div>
<div class="col">
<div class="form-group text-container p-2">
<label class="font-weight-bold">Hide lower chapters <a data-default="hideLowerChapters" class="btn btn-sm btn-secondary"><i class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
<label class="font-weight-bold">Hide <b>lower</b> chapters <a data-default="hideLowerChapters" class="btn btn-sm btn-secondary"><i class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
<p class="d-none d-xl-block">Hide all chapters that are inferior to your last read chapter on MangaDex.</p>
<div data-option="hideLowerChapters" data-type="checkbox" class="col px-0 my-auto input-group">
<div class="input-group-prepend">
Expand All @@ -154,6 +176,18 @@ <h1 class="text-container py-2 px-2"><i class="fas fa-bookmark"></i> Chapters li
</div>
</div>
</div>
<div class="form-group text-container p-2">
<label class="font-weight-bold">Hide <b>higher</b> chapters <a data-default="hideHigherChapters" class="btn btn-sm btn-secondary"><i class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
<p class="d-none d-xl-block">Hide all chapters that are higher than your last read chapter on MangaDex.</p>
<div data-option="hideHigherChapters" data-type="checkbox" class="col px-0 my-auto input-group">
<div class="input-group-prepend">
<button type="button" class="btn btn-success input-prepend col px-2">Enabled</button>
</div>
<div class="input-group-append">
<button type="button" class="btn btn-secondary input-append col px-2 active">Disabled</button>
</div>
</div>
</div>
<div class="form-group text-container p-2">
<label class="font-weight-bold">Highlight chapters <a data-default="highlightChapters" class="btn btn-sm btn-secondary"><i class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
<p class="d-none d-xl-block">If this option is disabled, no colors will be used. Does not prevent the <kbd>Hide lower chapters</kbd> and <kbd>Show tooltips</kbd> options to be applied.</p>
Expand All @@ -178,6 +212,18 @@ <h1 class="text-container py-2 px-2"><i class="fas fa-bookmark"></i> Chapters li
</div>
</div>
</div>
<div class="form-group text-container p-2">
<label class="font-weight-bold">Show full size cover <a data-default="showFullCover" class="btn btn-sm btn-secondary"><i class="fas fa-trash"></i><span class="d-none d-xl-inline"> Restore default</span></a></label>
<p class="d-none d-xl-block">Display the full cover of a title instead of it's thumbnail.<br><b>Some covers can be <i>big</i> and slow to load depending on your connection.</b></p>
<div data-option="showFullCover" data-type="checkbox" class="col px-0 my-auto input-group">
<div class="input-group-prepend">
<button type="button" class="btn btn-success input-prepend col px-2">Enabled</button>
</div>
<div class="input-group-append">
<button type="button" class="btn btn-secondary input-append col px-2 active">Disabled</button>
</div>
</div>
</div>
</div>
</div>
<!-- Chapter Page -->
Expand Down
17 changes: 11 additions & 6 deletions scripts/defaultOptions.js
Expand Up @@ -10,14 +10,18 @@ window.browser = (function () {
// Object containing all options
// Is initialized with the default options
let defaultOptions = {
lastReadColor: "rgba(75, 180, 60, 0.4)",
lastReadColor: "rgba(75, 180, 60, 0.6)",
lowerChaptersColor: "rgba(180, 102, 75, 0.4)",
higherChaptersColor: "transparent",
nextChapterColor: "rgba(199, 146, 2, 0.4)",
lastOpenColors: [
"rgba(102, 51, 153, 0.6)",
"rgba(75, 0, 130, 0.6)"
"rgba(28, 135, 141, 0.8)",
"rgba(22, 65, 87, 0.8)",
"rgba(28, 103, 141, 0.8)"
],
openedChaptersColor: "rgba(102, 75, 180, 0.6)",
openedChaptersColor: "rgba(28, 135, 141, 0.4)",
hideLowerChapters: true,
hideHigherChapters: false,
saveOnlyHigher: true,
saveOnlyNext: false,
confirmChapter: true,
Expand All @@ -28,6 +32,7 @@ let defaultOptions = {
historySize: 100,
updateMDList: false,
showTooltips: true,
showFullCover: false,
highlightChapters: true,
showNotifications: true,
showErrors: true,
Expand All @@ -36,6 +41,6 @@ let defaultOptions = {
username: "",
isLoggedIn: false,
token: "",
version: 2.2,
subVersion: 3
version: 2.3,
subVersion: 0
};

0 comments on commit 880e5de

Please sign in to comment.