From b70f57094ae6a288d93cc4690e63a8f16792e525 Mon Sep 17 00:00:00 2001 From: Thibault Duval Date: Wed, 10 May 2017 22:18:35 +0200 Subject: [PATCH 1/3] Add begining of main options page --- Scripts/FreeKiss/Options.js | 0 Scripts/Popup.js | 4 ++ Styles/FreeKiss/Options.css | 73 +++++++++++++++++++++++++++++++++++++ Views/FreeKissPopup.html | 4 +- Views/Options.html | 30 +++++++++++++++ 5 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 Scripts/FreeKiss/Options.js create mode 100644 Styles/FreeKiss/Options.css create mode 100644 Views/Options.html diff --git a/Scripts/FreeKiss/Options.js b/Scripts/FreeKiss/Options.js new file mode 100644 index 0000000..e69de29 diff --git a/Scripts/Popup.js b/Scripts/Popup.js index 5aeb102..7c2d6be 100644 --- a/Scripts/Popup.js +++ b/Scripts/Popup.js @@ -90,6 +90,10 @@ function Popup() { }); }); + $("#advancedOptions").click(function() { + chrome.tabs.create({'url': chrome.extension.getURL('Views/Options.html')}); + }); + }); } diff --git a/Styles/FreeKiss/Options.css b/Styles/FreeKiss/Options.css new file mode 100644 index 0000000..04a12d3 --- /dev/null +++ b/Styles/FreeKiss/Options.css @@ -0,0 +1,73 @@ +html, body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; +} + +#navigation { + position: fixed; + width: 100%; + height: 55px; + 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 { + height: 100%; + width: 100%; + background-color: #E8E8E8; +} \ No newline at end of file diff --git a/Views/FreeKissPopup.html b/Views/FreeKissPopup.html index 5476211..806f9c6 100644 --- a/Views/FreeKissPopup.html +++ b/Views/FreeKissPopup.html @@ -56,7 +56,9 @@ Disable FreeKiss - + + Advanced Options + diff --git a/Views/Options.html b/Views/Options.html new file mode 100644 index 0000000..df044f1 --- /dev/null +++ b/Views/Options.html @@ -0,0 +1,30 @@ + + + + FreeKiss - Options + + + + + + +
+ +
+ + + + + + From d05abe941ee16ed60a58d847bbb0311e4778a2c7 Mon Sep 17 00:00:00 2001 From: Thibault Duval Date: Mon, 15 May 2017 22:16:21 +0200 Subject: [PATCH 2/3] Add patchnotes in advanced menu --- Styles/FreeKiss/Options.css | 50 +++++++++++++++++++++++++++++--- Views/Export.html | 29 +++++++++++++++++++ Views/Options.html | 4 +-- Views/Patchnotes.html | 57 +++++++++++++++++++++++++++++++++++++ 4 files changed, 134 insertions(+), 6 deletions(-) create mode 100644 Views/Export.html create mode 100644 Views/Patchnotes.html diff --git a/Styles/FreeKiss/Options.css b/Styles/FreeKiss/Options.css index 04a12d3..8a6e31c 100644 --- a/Styles/FreeKiss/Options.css +++ b/Styles/FreeKiss/Options.css @@ -1,14 +1,17 @@ html, body { width: 100%; - height: 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; } @@ -67,7 +70,46 @@ html, body { } #content { - height: 100%; - width: 100%; - background-color: #E8E8E8; + width: 660px; + background-color: #F2F2F2; + 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; +} + +.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; } \ No newline at end of file diff --git a/Views/Export.html b/Views/Export.html new file mode 100644 index 0000000..eea8a3c --- /dev/null +++ b/Views/Export.html @@ -0,0 +1,29 @@ + + + + FreeKiss - Export + + + + + + +
+ +
+ + + + + diff --git a/Views/Options.html b/Views/Options.html index df044f1..2c8be9d 100644 --- a/Views/Options.html +++ b/Views/Options.html @@ -13,8 +13,8 @@ diff --git a/Views/Patchnotes.html b/Views/Patchnotes.html new file mode 100644 index 0000000..a318b0a --- /dev/null +++ b/Views/Patchnotes.html @@ -0,0 +1,57 @@ + + + + FreeKiss - Patchnotes + + + + + + +
+

Versions

+
+
+

0.3.0

+
    +
  • Bookmarks can now be managed from the frontpage.
  • +
  • Add manager on the mangas in the scrolling bar.
  • +
  • Add manager on the "New mangas" section.
  • +
  • Add manager on the "Most popular mangas" section.
  • +
  • Remove image tag for bookmarked mangas (mangas are now seen as bookmarked with the manager).
  • +
+
+
+

0.2.0

+
    +
  • Add image tag on the bookmarked mangas of the frontpage.
  • +
  • Add FreeKiss options menu.
  • +
  • Add minimum width of a chapter's page setting.
  • +
  • Add maximum width of a chapter's page setting.
  • +
  • Add enabling/disabling of the two previous settings.
  • +
  • Add FreeKiss disabling setting.
  • +
+
+
+

0.1.0

+
    +
  • Creation of FreeKiss.
  • +
  • Revamp bookmarks page design.
  • +
+
+
+ + + + From bec66b1cf94cbbfa38a6371c37a6bda026a4e44f Mon Sep 17 00:00:00 2001 From: Thibault Duval Date: Tue, 16 May 2017 21:59:27 +0200 Subject: [PATCH 3/3] v0.40 Add FreeKiss custom pages: - Add advanced options page - Add export bookmarks page (placeholder) - Add patchnotes page Frontpage bookmarks managers and enhanced bookmarks display can now be toggled on/off in the advanced options. --- Scripts/Bookmarks.js | 2 ++ Scripts/Class/Options.js | 2 ++ Scripts/FreeKiss/Options.js | 15 +++++++++++++++ Scripts/FrontPage.js | 8 ++++++++ Styles/FreeKiss/Options.css | 8 +++++++- Styles/FrontPage.css | 2 +- Views/Export.html | 2 +- Views/Options.html | 15 ++++++++++++++- Views/Patchnotes.html | 10 ++++++++++ manifest.json | 2 +- 10 files changed, 61 insertions(+), 5 deletions(-) diff --git a/Scripts/Bookmarks.js b/Scripts/Bookmarks.js index 86041d2..938d3f1 100644 --- a/Scripts/Bookmarks.js +++ b/Scripts/Bookmarks.js @@ -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) { diff --git a/Scripts/Class/Options.js b/Scripts/Class/Options.js index e165e5d..d53d02e 100644 --- a/Scripts/Class/Options.js +++ b/Scripts/Class/Options.js @@ -3,6 +3,8 @@ var Options = { // Default options options: { + frontpageManager: true, + enhancedDisplay: true, maxPageWidth: 800, maxDoublePageWidth: 1800, minPageWidth: 600, diff --git a/Scripts/FreeKiss/Options.js b/Scripts/FreeKiss/Options.js index e69de29..fbf09f6 100644 --- a/Scripts/FreeKiss/Options.js +++ b/Scripts/FreeKiss/Options.js @@ -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); \ No newline at end of file diff --git a/Scripts/FrontPage.js b/Scripts/FrontPage.js index 8ae2a38..d7da465 100644 --- a/Scripts/FrontPage.js +++ b/Scripts/FrontPage.js @@ -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); @@ -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) diff --git a/Styles/FreeKiss/Options.css b/Styles/FreeKiss/Options.css index 8a6e31c..645e4f9 100644 --- a/Styles/FreeKiss/Options.css +++ b/Styles/FreeKiss/Options.css @@ -71,7 +71,7 @@ html, body { #content { width: 660px; - background-color: #F2F2F2; + background-color: white; margin: 75px auto 0px auto; border: 1px solid #DBDBDB; border-radius: 1px; @@ -84,6 +84,12 @@ html, body { margin-bottom: 5px; } +#options +{ + margin: 15px 0px 15px 20px; + font-size: 14px; +} + .patch { margin-left: 20px; } diff --git a/Styles/FrontPage.css b/Styles/FrontPage.css index ab663fc..d3d4ac4 100644 --- a/Styles/FrontPage.css +++ b/Styles/FrontPage.css @@ -20,7 +20,7 @@ top: -4px; } -.scrollable { +.fk-scrollable { margin-top: -12px; height: 210px !important; } diff --git a/Views/Export.html b/Views/Export.html index eea8a3c..929b29b 100644 --- a/Views/Export.html +++ b/Views/Export.html @@ -20,7 +20,7 @@
- + Coming Soon™
diff --git a/Views/Options.html b/Views/Options.html index 2c8be9d..ce4aa2d 100644 --- a/Views/Options.html +++ b/Views/Options.html @@ -20,7 +20,20 @@
- +

Options

+
+ + + + + + + + + + + +
Add bookmarks management on KissManga frontpage.
Enhance bookmarks page display.
diff --git a/Views/Patchnotes.html b/Views/Patchnotes.html index a318b0a..859b2e7 100644 --- a/Views/Patchnotes.html +++ b/Views/Patchnotes.html @@ -22,6 +22,16 @@

Versions


+
+

0.4.0

+
    +
  • Add FreeKiss "Advanced Options" page.
  • +
  • Frontpage bookmarks managers can be toggled on/off in the advanced options.
  • +
  • Enhanced bookmarks display can be toggled on/off in the advanced options.
  • +
  • Add FreeKiss "Export Bookmarks" page (placeholder).
  • +
  • Add FreeKiss "Patchnotes" page.
  • +
+

0.3.0

    diff --git a/manifest.json b/manifest.json index ee41047..f82f07e 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "FreeKiss", "description": "Enhance your KissManga experience", - "version": "0.30", + "version": "0.40", "icons": { "16": "Images/Icons/icon16.png",