Skip to content

Commit

Permalink
Version 1.3.0
Browse files Browse the repository at this point in the history
+ Add Firefox compatibility
  • Loading branch information
Gerardufoin committed Sep 30, 2018
1 parent edbb976 commit 7576312
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
18 changes: 5 additions & 13 deletions Scripts/Class/Bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,14 @@ var Bookmarks = {
type: "GET",
url: "http://kissmanga.com/BookmarkList",
success: (html) => {
html = html.replace(/<img[^>]*>/g, "");
// |\r?\n|\r
// <table.+?<\/tr>(.*)<\/table> gi
// <tr[^>]*>(.+?)<\/tr> gi
// mid=['"](\w+)['"] i
// href=['"]\/?(.+?)['"] i
// bdid=['"](\w+)['"] i
// <a(?:(?!<a).)*aRead.+?<\/a> !
// <a.+?>(.+?)<\/a> i
// <td>Completed<\/td> i
//console.log(html);
obj.setBookmarks($(html).find(".listing tr:not(:first-child)"));
// We remove elements making FireFox cry about CSP (onClick, Images and everything beside the .listing table)
html = html.replace(/onClick=['"].+?['"]|<img[^>]*>|\r?\n|\r/gi, "");
let table = html.match(/<table[^>]+class=['"]listing['"].*<\/table>/gi)[0];
obj.setBookmarks($(table).find("tr:not(:first-child)"));
obj.executeCallbacks();
},
error: (req, status, err) => {
console.log("Error " + req.status + " while connecting to bookmarks list: " + err);
console.error("Error " + req.status + " while connecting to bookmarks list: " + err);
if (errorCB) {
errorCB(req.status);
}
Expand Down
3 changes: 2 additions & 1 deletion Scripts/Class/FreeKiss.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ var FreeKiss = {
*/
updateIcon: function(bookmarks, refreshAlarm) {
if (this.Options.get("showUnreadOnIcon") === true) {
chrome.runtime.sendMessage({message: "UpdateIcon", freekiss: this, bookmarks: bookmarks, refreshAlarm: refreshAlarm});
// NOTE: Objects have to be stripped of their methods or Firefox will refuse to send them... (Instead of, you know, sending them without their methods...)
chrome.runtime.sendMessage({message: "UpdateIcon", freekiss: JSON.parse(JSON.stringify(this)), bookmarks: JSON.parse(JSON.stringify(bookmarks)), refreshAlarm: refreshAlarm});
}
}
};
Expand Down
3 changes: 0 additions & 3 deletions Views/Options.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ <h1>Options</h1>
<option value=60>1 hour</option>
<option value=120>2 hours</option>
</select>
<div class="newFeature">
This option is a new feature. If you encounter any problem, you can report it on the <a href="https://chrome.google.com/webstore/detail/freekiss/jpndbkdfegaeebeehdmngbedkkchhflh/support">webstore support page</a>.
</div>
</td>
</tr>
<tr>
Expand Down
6 changes: 6 additions & 0 deletions Views/Patchnotes.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
<div id="content">
<h1>Versions</h1>
<hr>
<div class="patch">
<h2><a href="https://github.com/Gerardufoin/FreeKiss/releases/tag/v1.3.0">1.3.0</a></h2>
<ul>
<li>Freekiss is now available on Firefox.</li>
</ul>
</div>
<div class="patch">
<h2><a href="https://github.com/Gerardufoin/FreeKiss/releases/tag/v1.2.6">1.2.6</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.2.6",
"version": "1.3.0",

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

0 comments on commit 7576312

Please sign in to comment.