]> git.lizzy.rs Git - nhentai.git/commitdiff
Add viewer arrow support & Readme license badage
authorsymant233 <symant233@gmail.com>
Sat, 4 May 2019 03:04:43 +0000 (11:04 +0800)
committersymant233 <symant233@gmail.com>
Sat, 4 May 2019 03:04:43 +0000 (11:04 +0800)
.gitignore
README.md
nhentai/viewer/scripts.js

index 5dec9ffdb4470b33cc7db40f187234b1b5edcc48..0905537d12c710317d010a0c02c8bd7549ae08de 100644 (file)
@@ -5,3 +5,4 @@ dist/
 *.egg-info
 .python-version
 .DS_Store
+output/
index 6342a1637aa7c4cf04f4e59c31ea602942411b27..f5747a27bae2c569ab03400df11de2ec1733dadd 100644 (file)
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ nhentai
     |_| |_|_| |_|\___|_| |_|\__\__,_|_|\r
 \r
 あなたも変態。 いいね?  \r
-[![Build Status](https://travis-ci.org/RicterZ/nhentai.svg?branch=master)](https://travis-ci.org/RicterZ/nhentai) ![nhentai PyPI Downloads](https://img.shields.io/pypi/dm/nhentai.svg)  \r
+[![Build Status](https://travis-ci.org/RicterZ/nhentai.svg?branch=master)](https://travis-ci.org/RicterZ/nhentai) ![nhentai PyPI Downloads](https://img.shields.io/pypi/dm/nhentai.svg) ![![license](https://opensource.org/licenses/MIT)](https://img.shields.io/cocoapods/l/AFNetworking.svg)\r
 \r
 \r
 nHentai is a CLI tool for downloading doujinshi from [nhentai.net](http://nhentai.net).\r
@@ -26,6 +26,8 @@ nHentai is a CLI tool for downloading doujinshi from [nhentai.net](http://nhenta
 ### Usage\r
 **IMPORTANT**: To bypass the nhentai frequency limit, you should use `--login` option to log into nhentai.net.\r
 \r
+*The default download folder will be the path where you run the command (CLI path).*\r
+\r
 Download specified doujinshi:\r
 ```bash\r
 nhentai --id=123855,123866\r
@@ -78,8 +80,5 @@ NHENTAI=http://h.loli.club nhentai --id 123456
 ![](./images/download.png)  \r
 ![](./images/viewer.png)  \r
 \r
-### License  \r
-MIT\r
-\r
 ### あなたも変態\r
 ![](./images/image.jpg)\r
index 09f976e3bc56094db8b4817deda49ec99da94d2b..9dc516cd10acbb2e27d5700981997bc120bb3674 100644 (file)
@@ -46,17 +46,33 @@ document.getElementById('image-container').onclick = event => {
 document.onkeypress = event => {\r
     switch (event.key.toLowerCase()) {\r
         // Previous Image\r
-        case 'arrowleft':\r
         case 'a':\r
             changePage(currentPage - 1);\r
             break;\r
 \r
         // Next Image\r
         case ' ':\r
+        case 'esc': // future close page function\r
         case 'enter':\r
-        case 'arrowright':\r
         case 'd':\r
             changePage(currentPage + 1);\r
             break;\r
+    }// remove arrow cause it won't work\r
+};\r
+\r
+document.onkeydown = event =>{\r
+    switch (event.keyCode) {\r
+        case 37: //left\r
+            changePage(currentPage - 1);\r
+            break;\r
+        case 38: //up\r
+            changePage(currentPage - 1);\r
+            break;\r
+        case 39: //right\r
+            changePage(currentPage + 1);\r
+            break;\r
+        case 40: //down\r
+            changePage(currentPage + 1);\r
+            break;\r
     }\r
 };
\ No newline at end of file