--- /dev/null
+See [releases](https://github.com/Neko7sora/CommentGenerator-Re/releases)
\ No newline at end of file
- Node.js v14.16.x ~ v14.x
- yarn v1.22.10 ~ v1.x
- Electron v12.0.6 ~ v12.x
+
+## プログラム作成条件
+1. HTML5コメントジェネレーター、HTML5コメントジェネレーター改に、
+
+ **「なるべく、相互性のあるものにする」**
+
+ なるべくだから100%ではなくてもいいよ!!
+
+
+
+2. マイクラのMODみたいに、
+
+ **「プラグイン機能で拡張性あるものにする。」**
+
+ できるだけ、プラグインで補えるものにする。
+
+
+
+3. えーと....(ry
+
+
+## 開発者へ
+Node.jsの処理なのか、electron内でのJS処理なのかが分からなくならないように、
+
+Node.js(electron)の処理 --> `/* #Node.js */`
+
+electron内でのJS処理 --> `/* #electron */`
+
+を先頭に付けてくれるとありがたいです。
\ No newline at end of file
+++ /dev/null
-const { app, BrowserWindow } = require('electron')
-const path = require('path')
-
-function createWindow () {
- const win = new BrowserWindow({
- width: 800,
- height: 600,
- webPreferences: {
- preload: path.join(__dirname, 'preload.js')
- }
- })
-
- win.loadFile('index.html')
-}
-
-app.whenReady().then(() => {
- createWindow()
-
- app.on('activate', () => {
- if (BrowserWindow.getAllWindows().length === 0) {
- createWindow()
- }
- })
-})
-
-app.on('window-all-closed', () => {
- if (process.platform !== 'darwin') {
- app.quit()
- }
-})
\ No newline at end of file
"description": "My Electron app",
"main": "main.js",
"scripts": {
- "start": "electron main.js"
+ "start": "electron src/main.js"
},
"engines": {
"node": ">=14.16.0"
<html>
<head>
<meta charset="UTF-8">
+ <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<title>Hello World!</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
+
+ <!--通知-->
+ <script src="./renderer.js"></script>
</body>
</html>
\ No newline at end of file
--- /dev/null
+/* #Node.js */
+//アプリケーションを制御し、ネイティブなブラウザウィンドウを作成するモジュール
+const { app, BrowserWindow, Notification } = require('electron')
+const path = require('path')
+
+function createWindow() {
+ //ブラウザウィンドウを作成します。
+ const win = new BrowserWindow({
+ width: 800,
+ height: 600,
+ webPreferences: {
+ preload: path.join(__dirname, 'preload.js')
+ }
+ })
+
+ //アプリのindex.htmlを読み込みます。
+ win.loadFile('index.html')
+}
+
+function showNotification() {
+ //通知を表示します。
+ const notification = {
+ title: 'Basic Notification',
+ body: 'Notification from the Main process'
+ }
+ new Notification(notification).show()
+}
+
+// このメソッドは、Electronが初期化を終え、ブラウザウィンドウを作成する準備ができたときに呼び出されます。
+// 初期化が完了し、ブラウザウィンドウを作成する準備ができたときに呼び出されます。
+// いくつかのAPIは、このイベントが発生した後にのみ使用できます。
+app.whenReady().then(() => {
+ createWindow()// <-- function createWindow のやつを動かす。
+
+ // このリスナーは、アプリケーションが起動した後に動きます。
+ app.on('activate', () => {
+
+ // 表示されているウィンドウがないときにのみ動きます。
+ if (BrowserWindow.getAllWindows().length === 0) {
+ // 新しいブラウザウィンドウを作成します。
+ createWindow()
+ }
+
+ })
+}).then(() => {
+ showNotification()
+})
+
+// 開いているウィンドウがなくなったときにのみ動きます。
+// !このリスナーは、macOSではOSのウィンドウ管理の動作のため、使用できません。
+// !macOSでは、ユーザーがCmd + Qで明示的に終了させるまで、アプリケーションとそのメニューバーがアクティブなままであることが一般的です。
+// !(余談:Neko7soraは、macを持っていないため詳しく分かりません。以上....)
+app.on('window-all-closed', () => {
+ if (process.platform !== 'darwin') {
+ // アプリケーションを終了!!
+ app.quit()
+ }
+})
\ No newline at end of file
--- /dev/null
+## MultiCommentViewer 互換性プラグイン
+.xmlファイルをSQL形式に変換し、コメントを一カ所にまとめるためにSQLに送信します。(予定ではsqlliteを使用します。)
+
+理由: もし、他のコメント取得ソフトが登場した場合、MultiCommentViewerがまだプラットフォームに対応していないときなどに、コメントが別々にならないようにするためです。
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<log>
+ <comment no="0" time="1618741234" owner="0" service="twitch" handle="Neko7sora">テスト</comment>
+ <comment no="0" time="1618743590" owner="0" service="twitch" handle="Neko7sora">テスト</comment>
+ <comment no="0" time="1618745395" owner="0" service="twitch" handle="Neko7sora">test</comment>
+ <comment no="0" time="1618745792" owner="0" service="twitch" handle="Neko7sora">コメントテスト</comment>
+ <comment no="0" time="1618748575" owner="0" service="twitch" handle="Neko7sora">マルチテスト</comment>
+ <comment no="0" time="1618752291" owner="0" service="twitch" handle="Neko7sora">HTML5コメントジェネレーターのTwitchのテストするためのチャット送信!!</comment>
+ <comment no="0" time="1620124803" owner="0" service="twitch" handle="Neko7sora">komennto zyanere-ta- dousa kakuninn tesuto</comment>
+ <comment no="0" time="1620124841" owner="0" service="twitch" handle="Neko7sora">ちょっと</comment>
+ <comment no="0" time="1620124856" owner="0" service="twitch" handle="Neko7sora">komennto zyanere-ta- dousa kakuninn tesuto</comment>
+ <comment no="0" time="1620124968" owner="0" service="twitch" handle="Neko7sora">こんな感じになるはずです。</comment>
+ <comment no="0" time="1620125020" owner="0" service="twitch" handle="Neko7sora">生放送のコメントジェネレーターの準備完了!!!</comment>
+ <comment no="0" time="1620126511" owner="0" service="mirrativ" handle="" />
+ <comment no="0" time="1620126534" owner="0" service="nicolive" handle="" />
+ <comment no="0" time="1620126537" owner="0" service="nicolive" handle="" />
+ <comment no="0" time="1620126544" owner="0" service="nicolive" handle="" />
+ <comment no="0" time="1620126547" owner="0" service="nicolive" handle="" />
+ <comment no="0" time="1620126869" owner="0" service="mirrativ" handle="ごんぎつね">ごんぎつねが入室しました</comment>
+ <comment no="0" time="1620127216" owner="0" service="twitch" handle="ファイヤー">ファイヤー!</comment>
+ <comment no="0" time="1620127216" owner="0" service="twitch" handle="Nightbot">How barbaric. [stop posting links] [warning]</comment>
+ <comment no="0" time="1620128325" owner="0" service="nicolive" handle="" />
+</log>
\ No newline at end of file
+/* #Node.js */
+// Node.jsのすべてのAPIがプリロードプロセスで利用できます。
+// !Chrome の拡張機能と同じサンドボックスを持っています。
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
--- /dev/null
+/* #electron */
+// 通知のやつ
+const myNotification = new Notification('Title', {
+ body: 'Notification from the Renderer process'
+ })
+
+ myNotification.onclick = () => {
+ console.log('Notification clicked')
+ }
\ No newline at end of file