Skip to content

Commit

Permalink
Fix Some nhentai Problems with new Link System
Browse files Browse the repository at this point in the history
  • Loading branch information
RealLowMaster committed Feb 9, 2022
1 parent cabd834 commit a03b379
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 7 deletions.
16 changes: 13 additions & 3 deletions CSS/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ input::-webkit-input-placeholder { user-select: none }
cursor: default;
}

#off-page-sort > div {
#off-page-sort > div,
#off-sorter-toggle {
display: inline-block;
width: 30px;
height: 30px;
Expand All @@ -288,14 +289,23 @@ input::-webkit-input-placeholder { user-select: none }
cursor: pointer;
}

#off-page-sort > div > svg { width: 100%; height: 100% }
#off-page-sort > div:not([active]):hover { border-color: #5DADE2 }
#off-page-sort > div > svg,
#off-sorter-toggle > svg { width: 100%; height: 100% }
#off-page-sort > div:not([active]):hover,
#off-sorter-toggle:hover { border-color: #5DADE2 }

#off-page-sort > div[active] {
background-color: #2488cb;
color: #fff;
}

#off-sorter-toggle {
margin: 0;
position: absolute;
top: 17px;
left: 15px;
}

.right-cmenu {
display: none;
width: 170px;
Expand Down
6 changes: 5 additions & 1 deletion JS/classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class Tab {
nhentaiOpenPost(this.linksValue[index], newTab, true)
break
case 1:
nhentaiOpenInfo(this.linksValue[index][0], this.linksValue[index][1], this.linksValue[2], newTab, true)
nhentaiOpenInfo(this.linksValue[index][0], this.linksValue[index][1], this.linksValue[index][2], newTab, true)
break
case 2:
nhentaiOpenPages(this.linksValue[index][0], this.linksValue[index][1], this.linksValue[index][2], {tab}, true)
Expand Down Expand Up @@ -1047,6 +1047,10 @@ class OfflinePageManager {
return [min, max, allPages]
}

ToggleOffSorter() {

}

Reload() {
switch(this.loadIndex) {
case 0:
Expand Down
2 changes: 1 addition & 1 deletion JS/sites/nhentai.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const nhentai = new nHentaiAPI()
const nhentaiSiteTopMenu = `<div class="nhentai-top-menu"><i><svg xmlns="http://www.w3.org/2000/svg" width="482.556" height="209.281" viewBox="45.002 196.466 482.556 209.281"><path fill="#EC2854" stroke="#EC2854" stroke-miterlimit="10" d="M217.198 232.5c-16.597 6.907-52.729 34.028-36.249 58.467 7.288 10.807 19.94 18.442 31.471 22.057 10.732 3.363 23.897-.761 33.709 3.721-2.09 5.103-9.479 23.689-15.812 22.319-11.827-2.544-23.787-.445-33.07 8.485-18.958-26.295-45.97-36.974-75.739-29.676 22.066-27.2 16.719-55.687-6.468-81.622-13.999-15.657-47.993-37.963-69.845-28.853 54.591-22.738 121.119-5.555 172.003 25.102-8.815 3.669-3.617-2.179 0 0zm138.167 0c16.595 6.908 52.729 34.028 36.249 58.467-7.288 10.807-19.939 18.443-31.473 22.059-10.731 3.365-23.896-.762-33.712 3.721 2.104 5.112 9.464 23.671 15.812 22.318 11.826-2.542 23.789-.448 33.068 8.484 18.959-26.294 45.974-36.975 75.738-29.676-22.056-27.206-16.726-55.682 6.471-81.622 13.997-15.654 47.995-37.967 69.847-28.854-54.586-22.733-121.116-5.562-172 25.103 8.817 3.669 3.616-2.18 0 0z"/><path fill="none" d="M723.057 240.921H824.18v56.18H723.057z"/><path fill="#FFF" d="M225.434 293.58h23.199v15.919c6.874-6.563 14.154-11.274 21.841-14.137 7.687-2.863 16.234-4.295 25.64-4.295 20.621 0 34.549 5.552 41.785 16.653 3.979 6.074 5.969 14.766 5.969 26.077v71.95h-24.826v-70.693c0-6.842-1.312-12.358-3.935-16.547-4.344-6.982-12.209-10.473-23.604-10.473-5.789 0-10.538.455-14.246 1.363-6.693 1.536-12.572 4.608-17.636 9.216-4.07 3.701-6.716 7.522-7.937 11.467-1.221 3.945-1.832 9.582-1.832 16.913v58.754h-24.419l.001-112.167z"/></svg></i><button type="button" onmousedown="{r}">Random</button><button type="button" onmousedown="{t}">Tags</button><button type="button" onmousedown="{t1}">Artists</button><button type="button" onmousedown="{t2}">Characters</button><button type="button" onmousedown="{t3}">Parodies</button><button type="button" onmousedown="{t4}">Groups</button></div>`

function nhentaiMakeMenu(tabId) {
return nhentaiSiteTopMenu.replace('{r}', `LinkClick(${tabId,tabs[tabId].Add(5)})`).replace('{t}', `LinkClick(${tabId,tabs[tabId].Add(4,[1,0])})`).replace('{t1}', `LinkClick(${tabId,tabs[tabId].Add(4,[1,1])})`).replace('{t2}', `LinkClick(${tabId,tabs[tabId].Add(4,[1,2])})`).replace('{t3}', `LinkClick(${tabId,tabs[tabId].Add(4,[1,3])})`).replace('{t4}', `LinkClick(${tabId,tabs[tabId].Add(4,[1,4])})`)
return nhentaiSiteTopMenu.replace('{r}', `LinkClick(${tabId},${tabs[tabId].AddLink(5)})`).replace('{t}', `LinkClick(${tabId},${tabs[tabId].AddLink(4,[1,0])})`).replace('{t1}', `LinkClick(${tabId},${tabs[tabId].AddLink(4,[1,1])})`).replace('{t2}', `LinkClick(${tabId},${tabs[tabId].AddLink(4,[1,2])})`).replace('{t3}', `LinkClick(${tabId},${tabs[tabId].AddLink(4,[1,3])})`).replace('{t4}', `LinkClick(${tabId},${tabs[tabId].AddLink(4,[1,4])})`)
}

function nhentaiMakeErr(tabId,err) {
Expand Down
31 changes: 31 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,44 @@

<!-- Body -->
<div id="main-body">
<div id="off-sorter-toggle" onclick="PageManager.ToggleOffSorter()">S</div>
<p id="off-page-title"></p>
<div id="off-page-sort">
<div onclick="PageManager.Sort(0)" title="Sort Newest To Oldest" active><svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M330.17 258.91a79 79 0 0 0-55 54.17c-14.27 51.05 21.19 97.77 68.83 102.53a84.07 84.07 0 0 1-20.85 12.91c-7.57 3.4-10.8 12.47-8.18 20.34l9.9 20c2.87 8.63 12.53 13.49 20.9 9.91 58-24.76 86.25-61.61 86.25-132V336c-.02-51.21-48.4-91.34-101.85-77.09zM352 356a20 20 0 1 1 20-20 20 20 0 0 1-20 20zM304 96h16v64h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-16V48a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 304 96zM107.31 36.69a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.78 160 16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.38-17.24 11.31-27.31z"></path></svg></div>
<div onclick="PageManager.Sort(1)" title="Sort Oldest To Newest"><svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M304 96h16v64h-16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h96a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-16V48a16 16 0 0 0-16-16h-48a16 16 0 0 0-14.29 8.83l-16 32A16 16 0 0 0 304 96zm26.15 162.91a79 79 0 0 0-55 54.17c-14.25 51.05 21.21 97.77 68.85 102.53a84.07 84.07 0 0 1-20.85 12.91c-7.57 3.4-10.8 12.47-8.18 20.34l9.9 20c2.87 8.63 12.53 13.49 20.9 9.91 58-24.76 86.25-61.61 86.25-132V336c-.02-51.21-48.4-91.34-101.85-77.09zM352 356a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm-176-4h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352z"></path></svg></div>
<div onclick="PageManager.Sort(2)" title="Sort Z To A"><svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M176 352h-48V48a16 16 0 0 0-16-16H80a16 16 0 0 0-16 16v304H16c-14.19 0-21.36 17.24-11.29 27.31l80 96a16 16 0 0 0 22.62 0l80-96C197.35 369.26 190.22 352 176 352zm112-128h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z"></path></svg></div>
<div onclick="PageManager.Sort(3)" title="Sort A To Z"><svg aria-hidden="true" focusable="false" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M16 160h48v304a16 16 0 0 0 16 16h32a16 16 0 0 0 16-16V160h48c14.21 0 21.38-17.24 11.31-27.31l-80-96a16 16 0 0 0-22.62 0l-80 96C-5.35 142.74 1.78 160 16 160zm272 64h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-56l61.26-70.45A32 32 0 0 0 432 65.63V48a16 16 0 0 0-16-16H288a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h56l-61.26 70.45A32 32 0 0 0 272 190.37V208a16 16 0 0 0 16 16zm159.06 234.62l-59.27-160A16 16 0 0 0 372.72 288h-41.44a16 16 0 0 0-15.07 10.62l-59.27 160A16 16 0 0 0 272 480h24.83a16 16 0 0 0 15.23-11.08l4.42-12.92h71l4.41 12.92A16 16 0 0 0 407.16 480H432a16 16 0 0 0 15.06-21.38zM335.61 400L352 352l16.39 48z"></path></svg></div>
</div>
<div id="off-sorter">
<div>
<p>Groups</p>
<div></div>
</div>
<div>
<p>Artists</p>
<div></div>
</div>
<div>
<p>Parodies</p>
<div></div>
</div>
<div>
<p>Tags</p>
<div></div>
</div>
<div>
<p>Characters</p>
<div></div>
</div>
<div>
<p>Languages</p>
<div></div>
</div>
<div>
<p>Categories</p>
<div></div>
</div>
</div>
<div id="comic-container" page=""></div>
<div id="pagination"></div>
<p id="comics-counter"></p>
Expand Down
5 changes: 3 additions & 2 deletions task.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ DB => {
Add Comic {
League Of Legends
Aroma Sensei
xlecx => Search => ufos
xlecx => Group => Tracy Scops
Search => ufos
Group => Tracy Scops
Artist => Nisego

nhentai =>
Group => Behind Moon
Expand Down

0 comments on commit a03b379

Please sign in to comment.