Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Commit

Permalink
v1 Released!
Browse files Browse the repository at this point in the history
  • Loading branch information
pmh-only committed Jul 8, 2019
1 parent 7dded01 commit e519d2c
Show file tree
Hide file tree
Showing 8 changed files with 2,461 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ typings/

# next.js build output
.next

# build dis file
dist/
27 changes: 27 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
const electron = require('electron')
const app = electron.app
let mainWindow

app.on('ready', () => {
if (!mainWindow) createMainWindow()
})

app.on('activate', () => {
if (!mainWindow) createMainWindow()
})

app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit()
})

function createMainWindow () {
mainWindow = new electron.BrowserWindow({
webPreferences: {
nodeIntegration: true
},
autoHideMenuBar: true
}).on('close', () => {
mainWindow = null
})
mainWindow.loadFile('./src/index.html')
}
38 changes: 38 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "nekoview",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "electron .",
"start": "electron .",
"build": "build --win --x64"
},
"repository": {
"type": "git",
"url": "git+https://github.com/PMHStudio/Neko-view.git"
},
"author": "PMH Studio / PMH",
"license": "MIT",
"bugs": {
"url": "https://github.com/PMHStudio/Neko-view/issues"
},
"homepage": "https://github.com/PMHStudio/Neko-view#readme",
"dependencies": {
"superagent": "^5.1.0"
},
"devDependencies": {
"electron": "^5.0.6",
"electron-builder": "^20.44.4"
},
"build": {
"appId": "kr.kro.pmhstudio.neko",
"win": {
"target": [
"nsis",
"portable"
],
"publisherName": "PMH Studio / PMH"
}
}
}
6 changes: 6 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.container {
height: 100vh;
display: flex;
justify-content: center;
align-items: center
}
43 changes: 43 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!doctype html>
<html lang="en">
<head>
<title>Neko Viewer</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="./index.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
<script defer src="https://use.fontawesome.com/releases/v5.1.1/js/all.js" integrity="sha384-BtvRZcyfv4r0x/phJt9Y9HhnN5ur1Z+kZbKVgzVBAlQZX4jvAuImlIz+bG7TS00a" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="inner">
클립보드에 자동으로 사진의 URL이 복사됩니다
<div class="input-group mb-3">
<select id="select" class="form-control" aria-describedby="go">
<option value="holo">Holo</option>
<option value="neko">Neko</option>
<option value="kemonomimi">Kemonomimi</option>
<option value="kanna">Kanna</option>
<option value="gah">Gah</option>
<option value="coffee">Coffee</option>
<option value="food">Food</option>
</select>
<button onclick="start()" id="go" class="btn btn-primary"><i class="fas fa-angle-right"></i></button>
</div>
<input class="form-check-input" type="checkbox" id="inlineCheckbox1" value="option1" onclick="window.location.replace('./nsfw.html')">
<label class="form-check-label" for="inlineCheckbox1">NSFW Mode</label>
</div>
</div>
<script src="./index.js"></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
29 changes: 29 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const electron = require('electron').remote
const superagent = require('superagent')

function start () {
document.getElementById('go').disabled = true
let choice = document.getElementById('select').value
superagent.get('https://nekobot.xyz/api/image?type=' + choice, (err, res) => {
if (err) console.log(err)
let n = new electron.BrowserWindow({
frame: false,
})
n.setMenu(null)
n.loadURL(res.body.message)
copyTextToClipboard(res.body.message)
document.getElementById('go').disabled = false
})
}

function copyTextToClipboard (text) {
if (!navigator.clipboard) {
fallbackCopyTextToClipboard(text)
return
}
navigator.clipboard.writeText(text).then(() => {
console.log('Async: Copying to clipboard was successful!')
}, (err) => {
console.error('Async: Could not copy text: ', err)
});
}
55 changes: 55 additions & 0 deletions src/nsfw.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!doctype html>
<html lang="kr">
<head>
<title>Neko Viewer for Hentai</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="./index.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.1/css/all.css" integrity="sha384-O8whS3fhG2OnA5Kas0Y9l3cfpmYjapjI0E4theH4iuMD+pLhbf6JI0jIMfYcK3yZ" crossorigin="anonymous">
<script defer src="https://use.fontawesome.com/releases/v5.1.1/js/all.js" integrity="sha384-BtvRZcyfv4r0x/phJt9Y9HhnN5ur1Z+kZbKVgzVBAlQZX4jvAuImlIz+bG7TS00a" crossorigin="anonymous"></script>
</head>
<body>
<div class="container">
<div class="inner">
클립보드에 자동으로 사진의 URL이 복사됩니다
<div class="input-group mb-3">
<select id="select" class="form-control" aria-describedby="go">
<option value="hass">Hass(r19)</option>
<option value="hmidriff">HMidriff(r17)</option>
<option value="pgif">Pgif(r19)</option>
<option value="4k">4K(r19)</option>
<option value="hentai">Hentai(r19)</option>
<option value="holo">Holo</option>
<option value="hneko">HNeko(r19)</option>
<option value="neko">Neko</option>
<option value="hkitsune">HKitsune(r19)</option>
<option value="kemonomimi">Kemonomimi</option>
<option value="anal">Anal(r19)</option>
<option value="hanal">HAnal(r19)</option>
<option value="gonewild">Ahegao(r19)</option>
<option value="kanna">Kanna</option>
<option value="ass">Ass(r19)</option>
<option value="pussy">Pussy(r19)</option>
<option value="thigh">Thigh(r17)</option>
<option value="hthigh">HThigh(r19)</option>
<option value="gah">Gah</option>
<option value="coffee">Coffee</option>
<option value="food">Food</option>
</select>
<button onclick="start()" id="go" class="btn btn-primary"><i class="fas fa-angle-right"></i></button>
</div>
</div>
</div>
<script src="./index.js"></script>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>
Loading

0 comments on commit e519d2c

Please sign in to comment.