Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/Develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardufoin committed May 16, 2017
2 parents 0896a2e + bec66b1 commit 789e027
Show file tree
Hide file tree
Showing 12 changed files with 296 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Scripts/Bookmarks.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"use strict";

function BookmarksPage() {
// If the custom display is disabled, we do nothing
if (Options.get("enhancedDisplay") == false) return;

// The data of the images is processed by JQuery Tooltip and removed. So we need to get them before it happens using mutations.
var observer = new MutationObserver(function(mutations) {
Expand Down
2 changes: 2 additions & 0 deletions Scripts/Class/Options.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
var Options = {
// Default options
options: {
frontpageManager: true,
enhancedDisplay: true,
maxPageWidth: 800,
maxDoublePageWidth: 1800,
minPageWidth: 600,
Expand Down
15 changes: 15 additions & 0 deletions Scripts/FreeKiss/Options.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use strict";

function Init() {
$(document).ready(function() {
$("input[name='frontpageManager']").prop("checked", Options.get("frontpageManager"));
$("input[name='enhancedDisplay']").prop("checked", Options.get("enhancedDisplay"));

$("input[type='checkbox']").change(function() {
Options.set($(this).attr("name"), $(this).prop("checked"));
Options.save();
});
});
}

Options.init(Init, false);
8 changes: 8 additions & 0 deletions Scripts/FrontPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"use strict";

function FrontPage() {
// If the frontpage managers are disabled, we do nothing
if (Options.get("frontpageManager") == false) return;

Bookmarks.sync(function() {
$(".fk-management").each(function() {
UpdateBookmarkManagement(this);
Expand All @@ -11,6 +14,11 @@ function FrontPage() {
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {

// We add the fk-scrollable class on the scrollbar (not the prettiest way of doing it)
if (mutation.target.className == "scrollable") {
$(mutation.target).addClass("fk-scrollable");
}

// Add bookmark notifications in the scrollbar
if (mutation.target.className == "items") {
// Search through all the nodes of the mutation with the class "items" (divs inside the scrollbar)
Expand Down
4 changes: 4 additions & 0 deletions Scripts/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ function Popup() {
});
});

$("#advancedOptions").click(function() {
chrome.tabs.create({'url': chrome.extension.getURL('Views/Options.html')});
});

});
}

Expand Down
121 changes: 121 additions & 0 deletions Styles/FreeKiss/Options.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
html, body {
width: 100%;
margin: 0;
padding: 0;
background-color: #E8E8E8;
}

#navigation {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 55px;
z-index: 10;
background-color: #353535;
box-shadow: 0px 1px 3px 0px black, 0px 0px 1px #0d0d0d;
}

#title {
display: inline-block;
height: 55px;
width: 250px;
text-align: center;
background-color: #161616;
}

#title img {
margin-top: 5px;
}

#navigation ul {
vertical-align: top;
display: inline-block;
height: 55px;
margin: 0;
padding: 0;
list-style: none;
}

#navigation li {
display: inline-block;
height: 55px;
width: 250px;
text-align: center;
background-color: #242424;
}

#navigation li.selected {
background-color: #424242;
}

#navigation a {
display: inline-block;
width: 100%;
height: 55px;
line-height: 55px;

text-decoration: none;
color: white;
font-size: 22px;
}

#navigation .selected a {
font-style: italic;
cursor: default;
}

#navigation a:hover {
font-style: italic;
}

#content {
width: 660px;
background-color: white;
margin: 75px auto 0px auto;
border: 1px solid #DBDBDB;
border-radius: 1px;
padding-left: 20px;
padding-right: 20px;
box-shadow: 2px 2px 4px 0px #4A4A4A, 0px 0px 1px #0d0d0d;
}

#content h1 {
margin-bottom: 5px;
}

#options
{
margin: 15px 0px 15px 20px;
font-size: 14px;
}

.patch {
margin-left: 20px;
}

.patch h2 {
margin-bottom: 8px;
font-size: 20px;
}

.patch h2 a {
text-decoration: none;
color: black;
}

.patch h2 a:hover {
font-style: italic;
}

.patch ul {
margin-top: 0px;
margin-bottom: 25px;
font-size: 16px;
color: #333333;
}

.disabled {
font-style: italic;
color: #696969;
}
2 changes: 1 addition & 1 deletion Styles/FrontPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
top: -4px;
}

.scrollable {
.fk-scrollable {
margin-top: -12px;
height: 210px !important;
}
Expand Down
29 changes: 29 additions & 0 deletions Views/Export.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
<title>FreeKiss - Export</title>
<link rel="stylesheet" href="../Styles/FreeKiss/Options.css">
</head>
<body>

<div id="navigation">

<div id="title">
<img src="../Images/Icons/FreeKissTitle.png" width="220px" />
</div>
<ul>
<li><a href="Options.html">Advanced Options</a></li>
<li class="selected"><a href="#">Export Bookmarks</a></li>
<li><a href="Patchnotes.html">Patchnotes</a></li>
</ul>

</div>

<div id="content">
Coming Soon&trade;
</div>

<script src="../Tools/jquery-3.1.1.min.js"></script>
<script src="../Scripts/FreeKiss/Export.js"></script>
</body>
</html>
4 changes: 3 additions & 1 deletion Views/FreeKissPopup.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@
<td>
<a id="disable" href="#">Disable FreeKiss</a>
</td>
<td></td>
<td>
<a id="advancedOptions" href="#">Advanced Options</a>
</td>
</tr>
</table>
</div>
Expand Down
43 changes: 43 additions & 0 deletions Views/Options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!doctype html>
<html>
<head>
<title>FreeKiss - Options</title>
<link rel="stylesheet" href="../Styles/FreeKiss/Options.css">
</head>
<body>

<div id="navigation">

<div id="title">
<img src="../Images/Icons/FreeKissTitle.png" width="220px" />
</div>
<ul>
<li class="selected"><a href="#">Advanced Options</a></li>
<li><a href="Export.html">Export Bookmarks</a></li>
<li><a href="Patchnotes.html">Patchnotes</a></li>
</ul>

</div>

<div id="content">
<h1>Options</h1>
<hr>
<table id="options">
<tbody>
<tr>
<td><input type="checkbox" name="frontpageManager"></td>
<td>Add bookmarks management on KissManga frontpage.</td>
</tr>
<tr>
<td><input type="checkbox" name="enhancedDisplay"></td>
<td>Enhance bookmarks page display.</td>
</tr>
</tbody>
</table>
</div>

<script src="../Tools/jquery-3.1.1.min.js"></script>
<script src="../Scripts/Class/Options.js"></script>
<script src="../Scripts/FreeKiss/Options.js"></script>
</body>
</html>
67 changes: 67 additions & 0 deletions Views/Patchnotes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!doctype html>
<html>
<head>
<title>FreeKiss - Patchnotes</title>
<link rel="stylesheet" href="../Styles/FreeKiss/Options.css">
</head>
<body>

<div id="navigation">

<div id="title">
<img src="../Images/Icons/FreeKissTitle.png" width="220px" />
</div>
<ul>
<li><a href="Options.html">Advanced Options</a></li>
<li><a href="Export.html">Export Bookmarks</a></li>
<li class="selected"><a href="#">Patchnotes</a></li>
</ul>

</div>

<div id="content">
<h1>Versions</h1>
<hr>
<div class="patch">
<h2><a href="https://github.com/Gerardufoin/FreeKiss/releases/tag/v0.4.0">0.4.0</a></h2>
<ul>
<li>Add FreeKiss "Advanced Options" page.</li>
<li>Frontpage bookmarks managers can be toggled on/off in the advanced options.</li>
<li>Enhanced bookmarks display can be toggled on/off in the advanced options.</li>
<li>Add FreeKiss "Export Bookmarks" page (placeholder).</li>
<li>Add FreeKiss "Patchnotes" page.</li>
</ul>
</div>
<div class="patch">
<h2><a href="https://github.com/Gerardufoin/FreeKiss/releases/tag/v0.3.0">0.3.0</a></h2>
<ul>
<li>Bookmarks can now be managed from the frontpage.</li>
<li>Add manager on the mangas in the scrolling bar.</li>
<li>Add manager on the "New mangas" section.</li>
<li>Add manager on the "Most popular mangas" section.</li>
<li>Remove image tag for bookmarked mangas (mangas are now seen as bookmarked with the manager).</li>
</ul>
</div>
<div class="patch">
<h2><a href="https://github.com/Gerardufoin/FreeKiss/releases/tag/v0.2.0">0.2.0</a></h2>
<ul>
<li>Add image tag on the bookmarked mangas of the frontpage.</li>
<li>Add FreeKiss options menu.</li>
<li>Add minimum width of a chapter's page setting.</li>
<li>Add maximum width of a chapter's page setting.</li>
<li>Add enabling/disabling of the two previous settings.</li>
<li>Add FreeKiss disabling setting.</li>
</ul>
</div>
<div class="patch">
<h2 class="disabled">0.1.0</h2>
<ul>
<li>Creation of FreeKiss.</li>
<li>Revamp bookmarks page design.</li>
</ul>
</div>
</div>

<script src="../Tools/jquery-3.1.1.min.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "FreeKiss",
"description": "Enhance your KissManga experience",
"version": "0.30",
"version": "0.40",

"icons": {
"16": "Images/Icons/icon16.png",
Expand Down

0 comments on commit 789e027

Please sign in to comment.