mirror of
				https://github.com/RicterZ/nhentai.git
				synced 2025-11-04 02:50:55 +01:00 
			
		
		
		
	Merge pull request #51 from symant233/master
Add viewer arrow support, add README license badge.
This commit is contained in:
		
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -5,3 +5,4 @@ dist/
 | 
				
			|||||||
*.egg-info
 | 
					*.egg-info
 | 
				
			||||||
.python-version
 | 
					.python-version
 | 
				
			||||||
.DS_Store
 | 
					.DS_Store
 | 
				
			||||||
 | 
					output/
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@ nhentai
 | 
				
			|||||||
    |_| |_|_| |_|\___|_| |_|\__\__,_|_|
 | 
					    |_| |_|_| |_|\___|_| |_|\__\__,_|_|
 | 
				
			||||||
 | 
					
 | 
				
			||||||
あなたも変態。 いいね?  
 | 
					あなたも変態。 いいね?  
 | 
				
			||||||
[](https://travis-ci.org/RicterZ/nhentai)   
 | 
					[](https://travis-ci.org/RicterZ/nhentai)  [](https://github.com/RicterZ/nhentai/blob/master/LICENSE)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
nHentai is a CLI tool for downloading doujinshi from [nhentai.net](http://nhentai.net).
 | 
					nHentai is a CLI tool for downloading doujinshi from [nhentai.net](http://nhentai.net).
 | 
				
			||||||
@@ -26,6 +26,8 @@ nHentai is a CLI tool for downloading doujinshi from [nhentai.net](http://nhenta
 | 
				
			|||||||
### Usage
 | 
					### Usage
 | 
				
			||||||
**IMPORTANT**: To bypass the nhentai frequency limit, you should use `--login` option to log into nhentai.net.
 | 
					**IMPORTANT**: To bypass the nhentai frequency limit, you should use `--login` option to log into nhentai.net.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*The default download folder will be the path where you run the command (CLI path).*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Download specified doujinshi:
 | 
					Download specified doujinshi:
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
nhentai --id=123855,123866
 | 
					nhentai --id=123855,123866
 | 
				
			||||||
@@ -78,8 +80,5 @@ NHENTAI=http://h.loli.club nhentai --id 123456
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### License  
 | 
					 | 
				
			||||||
MIT
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
### あなたも変態
 | 
					### あなたも変態
 | 
				
			||||||

 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,17 +46,33 @@ document.getElementById('image-container').onclick = event => {
 | 
				
			|||||||
document.onkeypress = event => {
 | 
					document.onkeypress = event => {
 | 
				
			||||||
    switch (event.key.toLowerCase()) {
 | 
					    switch (event.key.toLowerCase()) {
 | 
				
			||||||
        // Previous Image
 | 
					        // Previous Image
 | 
				
			||||||
        case 'arrowleft':
 | 
					 | 
				
			||||||
        case 'a':
 | 
					        case 'a':
 | 
				
			||||||
            changePage(currentPage - 1);
 | 
					            changePage(currentPage - 1);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Next Image
 | 
					        // Next Image
 | 
				
			||||||
        case ' ':
 | 
					        case ' ':
 | 
				
			||||||
 | 
					        case 'esc': // future close page function
 | 
				
			||||||
        case 'enter':
 | 
					        case 'enter':
 | 
				
			||||||
        case 'arrowright':
 | 
					 | 
				
			||||||
        case 'd':
 | 
					        case 'd':
 | 
				
			||||||
            changePage(currentPage + 1);
 | 
					            changePage(currentPage + 1);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					    }// remove arrow cause it won't work
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					document.onkeydown = event =>{
 | 
				
			||||||
 | 
					    switch (event.keyCode) {
 | 
				
			||||||
 | 
					        case 37: //left
 | 
				
			||||||
 | 
					            changePage(currentPage - 1);
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        case 38: //up
 | 
				
			||||||
 | 
					            changePage(currentPage - 1);
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        case 39: //right
 | 
				
			||||||
 | 
					            changePage(currentPage + 1);
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        case 40: //down
 | 
				
			||||||
 | 
					            changePage(currentPage + 1);
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
		Reference in New Issue
	
	Block a user