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 Jan 16, 2019
2 parents cfa6e23 + 0ce3a83 commit d62ef1b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Development/References.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
External libraries used:
https://github.com/pieroxy/lz-string/blob/1.4.4/libs/lz-string.min.js
https://code.jquery.com/jquery-3.1.1.min.js
16 changes: 13 additions & 3 deletions Scripts/Bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,21 +174,30 @@ function BookmarksPage() {
* @param {boolean} delayed - If true, the node needed to use an observer before being inserted into the table and needs to be sorted
*/
function UpgradeBookmarkNode(node, delayed = false) {
// If the node has already been upgraded, we don't modify it again
if ($(node).hasClass("fk-up")) {
return;
}

// If the node does not contain all the td, we place an observer on it and return
if ($(node).children().length < 4) {
if ($(node).children().length < 5) {
new MutationObserver(function(mutations, observer) {
// We don't care about the mutation content, we just want to know when all 4 of the nodes are here
if ($(node).children().length >= 4) {
// We don't care about the mutation content, we just want to know when all 5 of the nodes are here
if ($(node).children().length >= 5) {
observer.disconnect();
UpgradeBookmarkNode(node, true);
}
}).observe(node, {childList: true});
return;
}

// We mark the node as upgraded
$(node).addClass("fk-up");

if ($(node).find("th").length > 0) {
if (FreeKiss.Options.get("bookmarksSorting") == true) return;
$(node).find("th:last-child").remove();
$(node).find("th:last-child").remove();
$(node).find("th:last-child").attr("width", "26%");

if (FreeKiss.Options.get("enhancedDisplay") == true) {
Expand All @@ -200,6 +209,7 @@ function UpgradeBookmarkNode(node, delayed = false) {
} else {
let mid = Bookmarks.updateBookmark(node);
$(node).find("td:last-child").remove();
$(node).find("td:last-child").remove();
$(node).find("td:last-child").empty();
let link = $(node).find("td:first-child a");
$(node).find("td:last-child").append(Management.CreateManager($(link).text(), $(link).attr("href").substring(1)));
Expand Down
4 changes: 3 additions & 1 deletion Scripts/Class/Bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ var Bookmarks = {
setBookmarks: function(bookmarks) {
this.mangas = {};
bookmarks.each((i, node) => {
this.updateBookmark(node);
if ($(node).find('td').length > 3) {
this.updateBookmark(node);
}
});
},
/**
Expand Down
4 changes: 2 additions & 2 deletions Scripts/Class/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ function MarkAsRead(node) {
$.ajax(
{
type: "POST",
url: "https://kissmanga.com/Bookmark/MarkBookmarkDetail",
url: "https://kissmanga.com/MarkBookmarkDetail",
data: {
"bdid": bid,
"strAlreadyRead": 1
Expand Down Expand Up @@ -523,7 +523,7 @@ function MarkAsUnread(node) {
$.ajax(
{
type: "POST",
url: "https://kissmanga.com/Bookmark/MarkBookmarkDetail",
url: "https://kissmanga.com/MarkBookmarkDetail",
data: {
"bdid": bid,
"strAlreadyRead": 0
Expand Down
2 changes: 1 addition & 1 deletion Styles/Bookmarks.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ tr td:last-child, tr th:last-child {
display: inline-block;
min-height: 215px;
height: 224px !important;
width: 150px !important;
width: 146px !important;
text-align: center;

margin: 0px 5px 15px 5px;
Expand Down
8 changes: 8 additions & 0 deletions Views/Patchnotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
<div id="content">
<h1>Versions</h1>
<hr>
<div class="patch">
<h2><a href="https://github.com/Gerardufoin/FreeKiss/releases/tag/v1.3.3">1.3.3</a></h2>
<ul>
<li>KissManga finally added a folder option to sort your bookmarks. Fixed the bugs generated by this addition.</li>
<li>This patch only fixes the bugs. FreeKiss does not interact with KissManga folders system yet. Using it may cause FreeKiss to not work as intended, so I recommend to not touch it for now if you intend to continue using FreeKiss.</li>
<li>I will have to think of a way to merge the folders system with FreeKiss when I'll have some time... If you have some suggestions send me an email.</li>
</ul>
</div>
<div class="patch">
<h2><a href="https://github.com/Gerardufoin/FreeKiss/releases/tag/v1.3.2">1.3.2</a></h2>
<ul>
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "FreeKiss",
"short_name": "FreeKiss",
"description": "Enhance your KissManga experience.",
"version": "1.3.2",
"version": "1.3.3",

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

0 comments on commit d62ef1b

Please sign in to comment.