diff --git a/assets/css/main.css b/assets/css/main.css index 7a7aa52..3782c46 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -81,19 +81,19 @@ body, html, .whole-view { flex-direction: column; } } .whole-view.tile.is-ancestor#whole-view { - margin: 22px 0 0; } + margin: 25px 0 0; } @media only screen and (max-width: 768px) { #main-view { display: flex; - margin-top: 50px; } } + margin-top: 60px; } } @media only screen and (min-width: 769px) { #main-view { min-height: 100vh; flex-shrink: 0; - flex-basis: calc(100% - 50px); - margin-left: 50px; } } + flex-basis: calc(100% - 60px); + margin-left: 60px; } } /** * Title Bar @@ -103,12 +103,34 @@ body, html, .whole-view { position: fixed; z-index: 10000; width: 100%; - height: 22px; + height: 25px; top: 0; -webkit-app-region: drag; } +.titlebar-close, +.titlebar-minimize, +.titlebar-fullscreen { + width: 12px; + height: 12px; + text-indent: -9999px; } + +.titlebar-close:hover { + border-color: #ad3934; + background-color: #bf4943; } + +.titlebar-minimize:hover { + border-color: #ad7d15; + background-color: #bf9123; } + +.titlebar-fullscreen:hover, +.titlebar-maximize:hover { + border-color: #128622; + background-color: #1f9a31; } + /* ---- Side Bar ---- */ .sidebar { + box-shadow: 2px 0px 5px 0px rgba(0, 0, 0, 0.3); + z-index: 99; -webkit-app-region: drag; background-color: #1f2b3d; } @media only screen and (max-width: 768px) { @@ -121,20 +143,20 @@ body, html, .whole-view { top: 0; transition: top 0.2s; } .sidebar.float-menu.nav-up { - top: -50px; } } + top: -60px; } } @media only screen and (min-width: 769px) { .sidebar { - width: 50px; + width: 60px; flex-grow: 0; flex-shrink: 0; - flex-basis: 50px; + flex-basis: 60px; height: 100vh; flex-direction: column; position: fixed; } } .sidebar .entry, .sidebar .convert { - height: 50px; + height: 60px; flex-grow: 0; - flex-basis: 50px; + flex-basis: 60px; display: flex; align-items: center; justify-content: center; @@ -192,7 +214,7 @@ body, html, .whole-view { justify-content: center; } @media only screen and (max-width: 768px) { #search-view .loading-bg { - height: calc(100vh - 50px - 68px); } } + height: calc(100vh - 60px - 68px); } } #search-view .loading { width: 2em; @@ -232,9 +254,9 @@ body, html, .whole-view { margin: 5px 0; padding: 1em; border-top: none; - border-radius: 3px; - box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); - background-color: #373f4e; + box-shadow: none; + background: transparent; + border-bottom: 1px solid #313e56; cursor: pointer; color: #fff; } .search-result.media .thumb, .favorite-entry.media .thumb { @@ -250,6 +272,11 @@ body, html, .whole-view { color: #fff; } .search-result.media:hover, .favorite-entry.media:hover { background-color: #303744; } + .search-result.media.subscribed, .subscribed.favorite-entry.media { + background-color: #373f4e; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); + border-bottom: 0px; + border-radius: 3px; } .search-result.media .content p, .favorite-entry.media .content p { margin: 10px 0; font-size: 15px; @@ -374,17 +401,18 @@ body, html, .whole-view { -webkit-user-select: none; } @media only screen and (max-width: 768px) { #read-view .middle-panel { - height: calc(100vh - 50px); + height: calc(100vh - 60px); width: 100vw; - top: 50px; } } + top: 60px; } } @media only screen and (min-width: 769px) { #read-view .middle-panel { - height: calc(100vh - 22px); + height: calc(100vh - 25px); width: 250px; position: fixed; overflow-y: auto; - border-left: 1px solid #24272c; - border-right: 1px solid #2d2f33; } } + left: 60px; + z-index: 2; + overflow-x: hidden; } } #read-view .middle-panel #comic-header { background-color: #4d5769; border-bottom: 1px solid #313743; @@ -393,37 +421,41 @@ body, html, .whole-view { @media only screen and (max-width: 768px) { #read-view .middle-panel #comic-header.float-menu { position: fixed; - height: 50px; + height: 60px; width: 100%; transition: top 0.2s; - top: 50px; } + top: 60px; } #read-view .middle-panel #comic-header.float-menu.nav-up { - top: -50px; } } + top: -60px; } } @media only screen and (min-width: 769px) { #read-view .middle-panel #comic-header { width: 250px; position: fixed; - left: 50px; - height: 50px; } } + left: calc($sidebar-widt + 1); + height: 60px; + box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.3); + font-size: 18px; } } #read-view .middle-panel #comic-header .level-item { margin: 0; } #read-view .middle-panel #comic-header .subscribe-btn { - line-height: 1em; - cursor: pointer; } + cursor: pointer; + position: absolute; + right: 15px; + top: 19px; } #read-view .middle-panel #comic-header .subscribe-btn.subscribed { color: #ff558d; } #read-view .middle-panel .loading-bg { z-index: 10000; } @media only screen and (max-width: 768px) { #read-view .middle-panel .loading-bg { - height: calc(100vh - 50px - 68px); } } + height: calc(100vh - 60px - 68px); } } @media only screen and (min-width: 769px) { #read-view .middle-panel .loading-bg { width: 250px; position: fixed; - height: calc(100vh - 50px); + height: calc(100vh - 60px); background-color: rgba(0, 0, 0, 0.8); - margin-top: 50px; } } + margin-top: 60px; } } #read-view .middle-panel .loading-bg .loading { width: 4em; height: 4em; @@ -433,12 +465,12 @@ body, html, .whole-view { top: 50%; left: calc(50% - 2em); } #read-view .middle-panel #chapter-selector { - margin-top: 50px; + margin-top: 60px; padding: 0; color: #cecece; } @media only screen and (max-width: 768px) { #read-view .middle-panel #chapter-selector { - height: calc(100vh - 50px*2); + height: calc(100vh - 60px*2); overflow-y: auto; } } @media only screen and (min-width: 769px) { #read-view .middle-panel #chapter-selector { @@ -457,10 +489,13 @@ body, html, .whole-view { #read-view .controlTips { position: absolute; - left: 310px; - top: calc(22px + 10px); + left: 320px; + top: calc(25px + 10px); z-index: 99; width: 160px; } + @media only screen and (max-width: 768px) { + #read-view .controlTips { + display: none; } } #read-view .controlTips li { display: block; width: 50px; @@ -499,15 +534,15 @@ body, html, .whole-view { padding: 0; } @media only screen and (max-width: 768px) { #read-view #read-area { - margin-top: 50px; - min-height: calc(100vh - 50px * 2); } } + margin-top: 60px; + min-height: calc(100vh - 60px * 2); } } @media only screen and (min-width: 769px) { #read-view #read-area { margin-left: 250px; - min-height: calc(100vh - 22px); } } + min-height: calc(100vh - 25px); } } #read-view #read-area .comic-page-container { margin-bottom: 1em; } #read-view #read-area .comic-page-container img { - height: calc(100vh - 22px); + height: calc(100vh - 25px); display: block; margin: 0 auto; } diff --git a/assets/scss/main.scss b/assets/scss/main.scss index 6348fd1..bde86e2 100644 --- a/assets/scss/main.scss +++ b/assets/scss/main.scss @@ -26,13 +26,13 @@ $container-max-width: 960px; /** * Title Bar */ -$titlebar-height: 22px; +$titlebar-height: 25px; /** * Sidebar **/ // layout -$sidebar-width: 50px; +$sidebar-width: 60px; // color $sidebar-bg-color: #1f2b3d; $sidebar-divider-color: #2b3b55; @@ -71,6 +71,7 @@ $chapter-selector-width: 250px; // display: flex; // } + body, html, .whole-view { font-family:'Roboto Condensed',"文泉驛正黑","WenQuanYi Zen Hei","黑體-繁","Heiti TC","微軟正黑體","Microsoft JhengHei",sans-serif; // background: linear-gradient(to bottom, #7072e3 0%,#7f66e5 44%,#964cdb 100%); @@ -127,11 +128,45 @@ body { -webkit-app-region: drag; } +.titlebar-close, +.titlebar-minimize, +.titlebar-fullscreen { + width: 12px; + height: 12px; + text-indent: -9999px +} + +.titlebar-close { + &:hover { + border-color: #ad3934; + background-color: #bf4943; + } +} + +.titlebar-minimize { + &:hover { + border-color: #ad7d15; + background-color: #bf9123; + } +} + + + +.titlebar-fullscreen, +.titlebar-maximize { + &:hover { + border-color: #128622; + background-color: #1f9a31; + } +} + + /* ---- Side Bar ---- */ // Tabview switcher .sidebar { - + box-shadow: 2px 0px 5px 0px rgba(0,0,0,0.3); + z-index: 99; @media #{$info-mobile} { &.float-menu { display:flex; @@ -302,9 +337,9 @@ body { margin: 5px 0; padding: 1em; border-top: none; - border-radius: 3px; - box-shadow: 0 2px 6px rgba(0,0,0,0.3); - background-color: $search-result-bg-color; + box-shadow: none; + background: transparent; + border-bottom: 1px solid #313e56; cursor: pointer; color: #fff; .thumb{ @@ -323,6 +358,12 @@ body { &:hover { background-color: $search-result-hover-bg-color; } + &.subscribed { + background-color: $search-result-bg-color; + box-shadow: 0 2px 6px rgba(0,0,0,0.3); + border-bottom: 0px; + border-radius: 3px; + } .content p { margin: 10px 0; font-size: 15px; @@ -481,7 +522,6 @@ body { } #read-view { - .middle-panel { @media #{$info-mobile} { height: calc(100vh - #{$sidebar-width}); @@ -494,10 +534,10 @@ body { width: $chapter-selector-width; position: fixed; overflow-y: auto; - border-left: 1px solid #24272c; - border-right: 1px solid #2d2f33; + left: $sidebar-width; + z-index: 2; + overflow-x: hidden; } - position: fixed; -webkit-user-select: none; #comic-header { @@ -514,32 +554,31 @@ body { } } } - @media #{$info-tablet} { width: #{$chapter-selector-width}; position: fixed; - left: $sidebar-width; + left: calc($sidebar-widt + 1); height: $sidebar-width; - // border-right: 1px solid #e3e3e3; + box-shadow: 0px 2px 3px 0px rgba(0,0,0,0.3); + font-size: 18px; } background-color: #4d5769; border-bottom: 1px solid #313743; color: #fff; display: flex; - .level-item { margin: 0; } - .subscribe-btn { - line-height: 1em; cursor: pointer; + position: absolute; + right: 15px; + top: 19px; &.subscribed { color: #ff558d; } } } - .loading-bg { @media #{$info-mobile} { height: calc(100vh - #{$sidebar-width} - 68px); @@ -552,7 +591,6 @@ body { margin-top: $sidebar-width; } z-index: 10000; - .loading { width: 4em; height: 4em; @@ -563,8 +601,6 @@ body { left: calc(50% - 2em); } } - - #chapter-selector { @media #{$info-mobile} { height: calc(100vh - #{$sidebar-width}*2); @@ -576,20 +612,16 @@ body { margin-top: $sidebar-width; padding: 0; color: #cecece; - .chapter-entry { cursor: pointer; background: #373e4a; border-bottom: 1px solid #313743; - &:hover { background-color: #2f3640; } - &.read { background-color: #3f4654; } - &.active { background-color: #2f3640; border-bottom: 2px solid #17c4bb; @@ -599,10 +631,13 @@ body { } .controlTips{ position: absolute; - left: 310px; + left: 320px; top: calc(#{$titlebar-height} + 10px); z-index: 99; width: 160px; + @media #{$info-mobile} { + display: none; + } li{ display: block; width: 50px; @@ -615,7 +650,6 @@ body { text-align: center; position: absolute; border-radius: 6px; - &:nth-child(1){ left: 55px; } diff --git a/npm-debug.log.1469225119 b/npm-debug.log.1469225119 new file mode 100644 index 0000000..6311c7a --- /dev/null +++ b/npm-debug.log.1469225119 @@ -0,0 +1,71 @@ +0 info it worked if it ends with ok +1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', +1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', +1 verbose cli 'run', +1 verbose cli 'watch-css' ] +2 info using npm@4.1.2 +3 info using node@v7.5.0 +4 warn onload-script failed to require onload script npm-autoinit/autoinit +5 warn onload-script Error: Cannot find module 'npm-autoinit/autoinit' +5 warn onload-script at Function.Module._resolveFilename (module.js:470:15) +5 warn onload-script at Function.Module._load (module.js:418:25) +5 warn onload-script at Module.require (module.js:498:17) +5 warn onload-script at require (internal/module.js:20:19) +5 warn onload-script at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:203:11) +5 warn onload-script at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:314:16 +5 warn onload-script at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 +5 warn onload-script at Array.forEach (native) +5 warn onload-script at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 +5 warn onload-script at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) +5 warn onload-script { Error: Cannot find module 'npm-autoinit/autoinit' +5 warn onload-script at Function.Module._resolveFilename (module.js:470:15) +5 warn onload-script at Function.Module._load (module.js:418:25) +5 warn onload-script at Module.require (module.js:498:17) +5 warn onload-script at require (internal/module.js:20:19) +5 warn onload-script at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:203:11) +5 warn onload-script at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:314:16 +5 warn onload-script at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 +5 warn onload-script at Array.forEach (native) +5 warn onload-script at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 +5 warn onload-script at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) code: 'MODULE_NOT_FOUND' } +6 verbose run-script [ 'prewatch-css', 'watch-css', 'postwatch-css' ] +7 info lifecycle comic-reader@0.1.10~prewatch-css: comic-reader@0.1.10 +8 silly lifecycle comic-reader@0.1.10~prewatch-css: no script for prewatch-css, continuing +9 info lifecycle comic-reader@0.1.10~watch-css: comic-reader@0.1.10 +10 verbose lifecycle comic-reader@0.1.10~watch-css: unsafe-perm in lifecycle true +11 verbose lifecycle comic-reader@0.1.10~watch-css: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\projects\github\comic-reader\node_modules\.bin;C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;D:\projects\github\comic-reader\node_modules\.bin;D:\cmder\bin;D:\cmder\vendor\conemu-maximus5\ConEmu\Scripts;D:\cmder\vendor\conemu-maximus5;D:\cmder\vendor\conemu-maximus5\ConEmu;C:\tools\ruby23\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Intel\Services\IPT\;C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\;C:\Program Files (x86)\Windows Live\Shared;C:\Users\bee\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Program Files\Java\jdk1.8.0_121\bin;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\TortoiseGit\bin;C:\Program Files (x86)\Skype\Phone\;C:\Users\bee\AppData\Local\Microsoft\WindowsApps;C:\Users\bee\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\bee\AppData\Local\atom\bin;C:\Users\bee\AppData\Roaming\npm;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\share\vim\vim74;D:\cmder\ +12 verbose lifecycle comic-reader@0.1.10~watch-css: CWD: D:\projects\github\comic-reader +13 silly lifecycle comic-reader@0.1.10~watch-css: Args: [ '/d /s /c', 'nodemon -e scss -x "npm run build-css"' ] +14 silly lifecycle comic-reader@0.1.10~watch-css: Returned: code: 3221225786 signal: null +15 info lifecycle comic-reader@0.1.10~watch-css: Failed to exec watch-css script +16 verbose stack Error: comic-reader@0.1.10 watch-css: `nodemon -e scss -x "npm run build-css"` +16 verbose stack Exit status 3221225786 +16 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16) +16 verbose stack at emitTwo (events.js:106:13) +16 verbose stack at EventEmitter.emit (events.js:192:7) +16 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) +16 verbose stack at emitTwo (events.js:106:13) +16 verbose stack at ChildProcess.emit (events.js:192:7) +16 verbose stack at maybeClose (internal/child_process.js:890:16) +16 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) +17 verbose pkgid comic-reader@0.1.10 +18 verbose cwd D:\projects\github\comic-reader +19 error Windows_NT 10.0.14393 +20 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch-css" +21 error node v7.5.0 +22 error npm v4.1.2 +23 error code ELIFECYCLE +24 error comic-reader@0.1.10 watch-css: `nodemon -e scss -x "npm run build-css"` +24 error Exit status 3221225786 +25 error Failed at the comic-reader@0.1.10 watch-css script 'nodemon -e scss -x "npm run build-css"'. +25 error Make sure you have the latest version of node.js and npm installed. +25 error If you do, this is most likely a problem with the comic-reader package, +25 error not with npm itself. +25 error Tell the author that this fails on your system: +25 error nodemon -e scss -x "npm run build-css" +25 error You can get information on how to open an issue for this project with: +25 error npm bugs comic-reader +25 error Or if that isn't available, you can get their info via: +25 error npm owner ls comic-reader +25 error There is likely additional logging output above. +26 verbose exit [ 1, true ] diff --git a/renderer-process/favorite-view.js b/renderer-process/favorite-view.js new file mode 100644 index 0000000..b616492 --- /dev/null +++ b/renderer-process/favorite-view.js @@ -0,0 +1,141 @@ +/** + * Favorite View + * favorite-view.js + * + * See Also: ../sections/favorite-view.html, + * ../sections/favorite-entry.html, + * ./subscriber.js + */ + +const settings = require("electron-settings"); + + +module.exports = { + updateSubscribeUI: updateSubscribeUI, + + // Binding functions + bindRegister: bindRegister, + bindSubscribe: bindSubscribe, + bindUnsubscribe: bindUnsubscribe, + bindSelectComic: bindSelectComic +} + +/** + * Action Binding + */ +var register; +var subscribe; +var unsubscribe; +var selectComic; + +function bindRegister(func) { + register = func; +} + +function bindSubscribe(func) { + subscribe = func; +} + +function bindUnsubscribe(func) { + unsubscribe = func; +} + +function bindSelectComic(func) { + selectComic = func; +} + +/** + * Update subscription indicator UI + */ +function updateSubscribeUI() { + $("#favorite-contents").html(""); + var comics = settings.get("comic"); + + for (var host in comics) { + for (var titleKey in comics[host]) { + if (comics[host][titleKey].subscribed) { + var link = comics[host][titleKey].link; + var imguri = comics[host][titleKey].thumbnail; + var title = comics[host][titleKey].title; + + var view = createFavEntry(link, titleKey, imguri, title, host); + + if (comics[host][titleKey].hasupdate) { + view.addClass("hasupdate"); + } + $("#favorite-contents").append(view); + } + } + } + +} + +/** + * Create a favorite entry HTML DOM object + * @param {String} link : link to comic + * @param {String} titleKey : title key store in settings + * @param {String} imguri : thumbnail's url + * @param {String} title : comic's name (human-readable) + * @param {String} host : host name + */ +function createFavEntry(link, titleKey, imguri, title, host) { + var view = $(favEntryViewStr); + view.find("img").each(function(n, img) { + view.find(".thumb").css({ + 'background': '#fff url(' + imguri + ') center center no-repeat', + 'background-size': 'cover' + }); + img.remove(); + }); + view.find(".comic-name").text(title); + view.find(".host").text(host); + var lastread = settings.get("comic." + host + "." + titleKey + ".lastread"); + var newest = settings.get("comic." + host + "." + titleKey + ".newestchapter"); + view.find(".last-read").text(lastread); + view.find(".newest").text(newest) + view.attr("title", title); + view.attr("link", link); + view.attr("titlekey", titleKey); + view.attr("host", host); + + view.find(".subscribe-btn").click(function(e){ + e.stopPropagation(); + console.log(host); + console.log(titleKey); + unsubscribe(host, titleKey); + }); + + view.click(function(e){ + console.log("fav click:" + title + ", from:" + host); + selectComic(host, link, title, titleKey, imguri); + + }); + + return view; +} + + + + +/** + * Initialized + */ + +function init () { + $.get('./sections/favorite-entry.html', function(result) { + favEntryViewStr = result; + }) +} + +// init when documen is ready +function lateInit() { + // updateSubscribeUIStatus(); +} + + +/** + * Main Script + */ + +init(); +$(document).ready(lateInit); diff --git a/renderer-process/util.js b/renderer-process/util.js index cecc9b4..f325acc 100644 --- a/renderer-process/util.js +++ b/renderer-process/util.js @@ -6,8 +6,8 @@ module.exports = { /** * Convert an input string to Unicode format - * @param {String} str - * + * @param {String} str + * * @return {String} string in unicode format */ function toUnicode(str, header="%u"){ @@ -39,4 +39,4 @@ function getSelected() { // return ""; // } return ""; -} \ No newline at end of file +} diff --git a/renderer-process/viewcontrollers/favorite-viewcontroller.js b/renderer-process/viewcontrollers/favorite-viewcontroller.js index ee0d27a..6308303 100644 --- a/renderer-process/viewcontrollers/favorite-viewcontroller.js +++ b/renderer-process/viewcontrollers/favorite-viewcontroller.js @@ -1,7 +1,7 @@ /** * Favorite View * favorite-viewcontroller.js - * + * * See Also: ../sections/favorite-view.html, * ../sections/favorite-entry.html, * ./subscriber.js @@ -73,7 +73,7 @@ function updateSubscribeUI(all_comic_data) { /** * Create a favorite entry HTML DOM object - * @param {String} link : link to comic + * @param {String} link : link to comic * @param {String} titlekey : title key store in settings * @param {String} imguri : thumbnail's url * @param {String} title : comic's name (human-readable) diff --git a/renderer-process/viewcontrollers/search-viewcontroller.js b/renderer-process/viewcontrollers/search-viewcontroller.js index f8e5594..e709e05 100644 --- a/renderer-process/viewcontrollers/search-viewcontroller.js +++ b/renderer-process/viewcontrollers/search-viewcontroller.js @@ -71,7 +71,6 @@ function createResultView(link, titlekey, imguri, title, host, updateinfo, descr selectComicFunc(host, link, title, titlekey, imguri); } }) - view.find(".subscribe-btn").click(function(e) { e.stopPropagation(); subscribeFunc(host, titlekey, title, link, imguri); @@ -125,15 +124,17 @@ function updateSubscribeUI(all_comic_Data) { var host = dom.attr("host"); var titlekey = dom.attr("titlekey"); // var keyPath = "comic." + host + "." + titleKey; - - if (all_comic_Data && all_comic_Data[host] - && all_comic_Data[host][titlekey] + + if (all_comic_Data && all_comic_Data[host] + && all_comic_Data[host][titlekey] && all_comic_Data[host][titlekey].subscribed) { dom.find(".subscribe-btn").addClass("subscribed"); + dom.addClass("subscribed"); } else { dom.find(".subscribe-btn").removeClass("subscribed"); + dom.removeClass("subscribed"); } - }); + }); } diff --git a/sections/favorite-entry.html b/sections/favorite-entry.html index ecf2ebd..fae2346 100644 --- a/sections/favorite-entry.html +++ b/sections/favorite-entry.html @@ -21,6 +21,12 @@

Episode 0

+
+
+

LAST READ : 

+

Episode 0

+
+

NEWEST :