Skip to content

Commit db35c5b

Browse files
committed
first release.
1 parent 39536a0 commit db35c5b

File tree

182 files changed

+455
-36690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+455
-36690
lines changed
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
"use strict";
2+
3+
const electron = require('electron');
4+
const app = electron.app;
5+
const BrowserWindow = electron.BrowserWindow;
6+
7+
let mainWindow;
8+
9+
const {Menu, Tray} = require('electron');
10+
11+
let tray = null
12+
13+
// 全てのウィンドウが閉じたら終了
14+
app.on('window-all-closed', function() {
15+
if (process.platform != 'darwin') {
16+
app.quit();
17+
}
18+
});
19+
20+
// Electronの初期化完了後に実行
21+
app.on('ready', function() {
22+
// メイン画面の表示。ウィンドウの幅、高さを指定できる
23+
mainWindow = new BrowserWindow({
24+
width: 1000,
25+
height: 600,
26+
alwaysOnTop: true,
27+
//titleBarStyle: 'hidden',
28+
});
29+
30+
mainWindow.loadURL('https://abema.tv');
31+
32+
// ウィンドウが閉じられたらアプリも終了
33+
mainWindow.on('closed', function() {
34+
mainWindow = null;
35+
});
36+
37+
// トレイ
38+
var iconPath = __dirname + '/images/tray.png';
39+
tray = new Tray(iconPath)
40+
const contextMenu = Menu.buildFromTemplate([
41+
{label: 'チャンネルリスト', type: 'normal'},
42+
{label: 'AbemaNews', click: function() {mainWindow.loadURL('http://qiita.com/')}},
43+
{label: 'homge', type: 'radio'},
44+
{label: 'ウィンドウを常に最前面にする',type: 'checkbox', checked:true, click: function() {
45+
let alwaysOnTop = mainWindow.isAlwaysOnTop();
46+
alwaysOnTop = !alwaysOnTop;
47+
mainWindow.setAlwaysOnTop(alwaysOnTop);
48+
}},
49+
{label: 'ウィンドウの移動を禁止する',type: 'checkbox', checked:false, click: function() {
50+
let ismovable_answer = mainWindow.isMovable();
51+
ismovable_answer = !ismovable_answer;
52+
mainWindow.setMovable(ismovable_answer);
53+
}},
54+
{label: 'クリックを禁止する',type: 'checkbox', checked:false, click: function() {
55+
mainWindow.setIgnoreMouseEvents(contextMenu.items[5].checked);
56+
}},
57+
{label: 'test', type: 'checkbox', click: function() { mainWindow.setMovable(false); }},
58+
{label: 'Item2', type: 'radio'},
59+
{label: 'Item3', type: 'radio', checked: true},
60+
{label: 'Item4', type: 'radio'},
61+
{type: 'separator'},
62+
{label: '設定' ,submenu: [
63+
{label: 'ウィンドウレベル'},
64+
{label: '2'},
65+
]},
66+
{label: '終了', accelerator: 'Command+Q', click: function() { app.quit(); }},
67+
])
68+
69+
tray.setContextMenu(contextMenu)
70+
71+
});

Abema-Viewer-darwin-x64/Abema-Viewer.app/Contents/Resources/app/index.js

+60-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"use strict";
22

3-
const electron = require("electron");
3+
const electron = require('electron');
44
const app = electron.app;
55
const BrowserWindow = electron.BrowserWindow;
66

77
let mainWindow;
88

9-
const {Menu, Tray} = require('electron')
9+
const {Menu, Tray} = require('electron');
10+
1011
let tray = null
1112

1213
// 全てのウィンドウが閉じたら終了
@@ -23,18 +24,74 @@ app.on('ready', function() {
2324
width: 1000,
2425
height: 600,
2526
alwaysOnTop: true,
27+
frame: false,
2628
});
2729

2830
mainWindow.loadURL('https://abema.tv');
31+
mainWindow.webContents.insertCSS(':root{--html-margin:3px}html{overflow:hidden;margin:var(--html-margin);-webkit-app-region:drag;height:calc(1 - (var(--html-margin)* 2));width:calc(1 - (var(--html-margin)* 2))}body{height:100%;width:100%;margin:0;padding:0}img{margin-left:calc(var(--html-margin)* -1);margin-top:calc(var(--html-margin)* -1);height:calc(1 + (var(--html-margin)* 2));width:calc(1 + (var(--html-margin)* 2))}');
2932

3033
// ウィンドウが閉じられたらアプリも終了
3134
mainWindow.on('closed', function() {
3235
mainWindow = null;
36+
app.quit();
3337
});
3438

3539
// トレイ
36-
var iconPath = __dirname + '/tray.png';
40+
var iconPath = __dirname + '/images/tray.png';
3741
tray = new Tray(iconPath)
42+
const contextMenu = Menu.buildFromTemplate([
43+
{label: 'チャンネル', submenu:[
44+
{label: 'AbemaNews', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/abema-news')}},
45+
{label: 'AbemaSPECIAL', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/abema-special')}},
46+
{label: 'SPECIAL PLUS', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/special-plus')}},
47+
{label: 'SPECIAL PLUS 2', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/special-plus-2')}},
48+
{label: '海外ドラマ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/foreign-drama')}},
49+
{label: 'ドラマ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/drama')}},
50+
{label: 'REALITY SHOW', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/reality-show')}},
51+
{label: 'MTV HITS', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/mtv-hits')}},
52+
{label: 'SPACE SHOWER MUSIC', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/space-shower')}},
53+
{label: 'Documentary', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/documentary')}},
54+
{label: 'バラエティ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/variety')}},
55+
{label: 'ペット', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/pet')}},
56+
{label: 'CLUB', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/club-channel')}},
57+
{label: 'WORLD SPORTS', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/world-sports')}},
58+
{label: 'EDGE SPORT', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/edge-sport')}},
59+
{label: 'VICE', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/vice')}},
60+
{label: 'アニメ24', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/anime24')}},
61+
{label: '深夜アニメ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/midnight-anime')}},
62+
{label: 'なつかしアニメ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/oldtime-anime')}},
63+
{label: '家族アニメ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/family-anime')}},
64+
{label: '新作 TV アニメ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/new-anime')}},
65+
{label: 'ヨコノリ', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/yokonori-sports')}},
66+
{label: '釣り', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/fishing')}},
67+
{label: '麻雀', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/mahjong')}},
68+
{label: 'SPORTS LIVE', click: function() {mainWindow.loadURL('https://abema.tv/now-on-air/world-sports-1')}}
69+
]},
70+
{type: 'separator'},
71+
72+
{label: '設定' ,submenu: [
73+
{label: 'ウィンドウを常に最前面にする',type: 'checkbox', checked:true, click: function() {
74+
let alwaysOnTop = mainWindow.isAlwaysOnTop();
75+
alwaysOnTop = !alwaysOnTop;
76+
mainWindow.setAlwaysOnTop(alwaysOnTop);
77+
}},
78+
{label: 'ウィンドウの移動を禁止する',type: 'checkbox', checked:false, click: function() {
79+
let ismovable_answer = mainWindow.isMovable();
80+
ismovable_answer = !ismovable_answer;
81+
mainWindow.setMovable(ismovable_answer);
82+
}},
83+
{label: 'クリックを禁止する',type: 'checkbox', checked:false, click: function() {
84+
mainWindow.setIgnoreMouseEvents(contextMenu.items[2].submenu.items[2].checked);
85+
}},
86+
{label: 'フルスクリーンにする',type: 'checkbox', checked:false, click: function() {
87+
let isfullscreen_answer = mainWindow.isFullScreen();
88+
isfullscreen_answer = !isfullscreen_answer;
89+
mainWindow.setFullScreen(isfullscreen_answer);
90+
}},
91+
]},
92+
{label: '終了', accelerator: 'Command+Q', click: function() { app.quit(); }},
93+
])
3894

95+
tray.setContextMenu(contextMenu)
3996

4097
});

Abema-Viewer-darwin-x64/Abema-Viewer.app/Contents/Resources/app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Abema-Viewer",
33
"version": "1.0.0",
4-
"description": "",
4+
"description": "This is Abema TV viewer.",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"
@@ -11,7 +11,7 @@
1111
"url": "git+https://github.com/veadar/Abema-Viewer.git"
1212
},
1313
"keywords": [],
14-
"author": "",
14+
"author": "veadar",
1515
"license": "ISC",
1616
"bugs": {
1717
"url": "https://github.com/veadar/Abema-Viewer/issues"
Binary file not shown.

Abema-Viewer-linux-x64/Abema-Viewer

-64.5 MB
Binary file not shown.

Abema-Viewer-linux-x64/LICENSE

-20
This file was deleted.

Abema-Viewer-linux-x64/LICENSES.chromium.html

-101
This file was deleted.
-9.42 MB
Binary file not shown.

Abema-Viewer-linux-x64/icudtl.dat

-9.66 MB
Binary file not shown.

Abema-Viewer-linux-x64/libffmpeg.so

-2.46 MB
Binary file not shown.

Abema-Viewer-linux-x64/libnode.so

-20.1 MB
Binary file not shown.

Abema-Viewer-linux-x64/locales/am.pak

-6 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ar.pak

-5.64 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/bg.pak

-6.63 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/bn.pak

-8.53 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ca.pak

-4.04 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/cs.pak

-3.91 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/da.pak

-3.53 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/de.pak

-3.99 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/el.pak

-7.17 KB
Binary file not shown.
-3.42 KB
Binary file not shown.
-3.42 KB
Binary file not shown.
-4.21 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/es.pak

-4.34 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/et.pak

-3.65 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/fa.pak

-5.58 KB
Binary file not shown.
-5.94 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/fi.pak

-3.73 KB
Binary file not shown.
-4.24 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/fr.pak

-4.42 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/gu.pak

-8.03 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/he.pak

-4.49 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/hi.pak

-7.63 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/hr.pak

-3.9 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/hu.pak

-4.32 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/id.pak

-3.59 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/it.pak

-4.02 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ja.pak

-4.74 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/kn.pak

-9.15 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ko.pak

-3.88 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/lt.pak

-4.09 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/lv.pak

-4.22 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ml.pak

-10 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/mr.pak

-7.84 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ms.pak

-3.7 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/nb.pak

-3.49 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/nl.pak

-3.75 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/pl.pak

-3.89 KB
Binary file not shown.
-3.87 KB
Binary file not shown.
-3.92 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ro.pak

-4.24 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ru.pak

-6.15 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/sk.pak

-3.98 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/sl.pak

-3.84 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/sr.pak

-6.16 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/sv.pak

-3.44 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/sw.pak

-3.93 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/ta.pak

-9.91 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/te.pak

-9.53 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/th.pak

-7.66 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/tr.pak

-3.79 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/uk.pak

-6.25 KB
Binary file not shown.

Abema-Viewer-linux-x64/locales/vi.pak

-4.56 KB
Binary file not shown.
-3.45 KB
Binary file not shown.
-3.42 KB
Binary file not shown.

0 commit comments

Comments
 (0)