├── .bowerrc ├── .gitignore ├── Gruntfile.coffee ├── HISTORY.md ├── README.md ├── bower.json ├── package.json ├── src ├── app.coffee ├── app.jade ├── app.styl ├── img │ └── icon.png ├── lib │ └── jquery.js └── package.json └── var ├── teitoku.ai ├── teitoku.icns ├── teitoku.ico └── teitoku.png /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "vendor/bower" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Apple* 2 | .DS_Store 3 | *.swp 4 | *.diff 5 | 6 | /release 7 | /vendor 8 | /build 9 | /lib 10 | 11 | /npm-debug.log 12 | /node_modules 13 | 14 | -------------------------------------------------------------------------------- /Gruntfile.coffee: -------------------------------------------------------------------------------- 1 | coffeelint = require 'coffeelint' 2 | {reporter} = require 'coffeelint-stylish' 3 | 4 | module.exports = (grunt) -> 5 | 6 | grunt.loadNpmTasks 'grunt-contrib-clean' 7 | grunt.loadNpmTasks 'grunt-contrib-copy' 8 | grunt.loadNpmTasks 'grunt-contrib-jade' 9 | grunt.loadNpmTasks 'grunt-contrib-coffee' 10 | grunt.loadNpmTasks 'grunt-contrib-stylus' 11 | grunt.loadNpmTasks 'grunt-contrib-uglify' 12 | grunt.loadNpmTasks 'grunt-contrib-compress' 13 | grunt.loadNpmTasks 'grunt-node-webkit-builder' 14 | grunt.loadNpmTasks 'grunt-notify' 15 | 16 | grunt.registerMultiTask 'coffeelint', 'CoffeeLint', -> 17 | count = e: 0, w: 0 18 | options = @options() 19 | (files = @filesSrc).forEach (file) -> 20 | grunt.verbose.writeln "Linting #{file}..." 21 | errors = coffeelint.lint (grunt.file.read file), options, !!/\.(litcoffee|coffee\.md)$/i.test file 22 | unless errors.length 23 | return grunt.verbose.ok() 24 | reporter file, errors 25 | errors.forEach (err) -> 26 | switch err.level 27 | when 'error' then count.e++ 28 | when 'warn' then count.w++ 29 | else return 30 | message = "#{file}:#{err.lineNumber} #{err.message} (#{err.rule})" 31 | grunt.event.emit "coffeelint:#{err.level}", err.level, message 32 | grunt.event.emit 'coffeelint:any', err.level, message 33 | return no if count.e and !options.force 34 | if !count.w and !count.e 35 | grunt.log.ok "#{files.length} file#{if 1 < files.length then 's'} lint free." 36 | 37 | grunt.registerTask 'default', [ 38 | 'clean', 'copy', 'jade', 'stylus', 'coffeelint', 'coffee', 'uglify', 'nodewebkit' 39 | ] 40 | 41 | pkg = grunt.file.readJSON 'package.json' 42 | 43 | grunt.initConfig 44 | 45 | pkg: pkg 46 | 47 | # static 48 | 49 | clean: 50 | compile: 51 | src: [ 'lib' ] 52 | 53 | copy: 54 | compile: 55 | files: [{ 56 | expand: yes 57 | cwd: 'src' 58 | src: [ '**/*', '!**/*.{coffee,styl,jade}' ] 59 | dest: 'lib' 60 | }] 61 | 62 | jade: 63 | options: 64 | data: pkg: pkg 65 | compile: 66 | files: [{ 67 | expand: yes 68 | cwd: 'src' 69 | src: [ '*.jade', '**/*.jade' ] 70 | dest: 'lib' 71 | ext: '.html' 72 | }] 73 | 74 | stylus: 75 | options: 76 | compress: yes 77 | compile: 78 | files: [{ 79 | expand: yes 80 | cwd: 'src' 81 | src: [ '*.styl', '**/*.styl' ] 82 | dest: 'lib' 83 | ext: '.css' 84 | }] 85 | 86 | coffee: 87 | compile: 88 | files: [{ 89 | expand: yes 90 | cwd: 'src' 91 | src: [ '*.coffee', '**/*.coffee' ] 92 | dest: 'lib' 93 | ext: '.js' 94 | }] 95 | 96 | coffeelint: 97 | options: 98 | arrow_spacing: 99 | level: 'error' 100 | colon_assignment_spacing: 101 | spacing: left: 0, right: 1 102 | level: 'error' 103 | cyclomatic_complexity: 104 | value: 15 105 | level: 'warn' 106 | empty_constructor_needs_parens: 107 | level: 'error' 108 | indentation: 109 | level: 'error' 110 | value: 2 111 | max_line_length: 112 | level: 'error' 113 | value: 79 114 | newlines_after_classes: 115 | level: 'error' 116 | no_empty_functions: 117 | level: 'warn' 118 | no_empty_param_list: 119 | level: 'error' 120 | no_interpolation_in_single_quotes: 121 | level: 'warn' 122 | no_stand_alone_at: 123 | level: 'warn' 124 | no_unnecessary_double_quotes: 125 | level: 'warn' 126 | no_unnecessary_fat_arrows: 127 | level: 'error' 128 | space_operators: 129 | level: 'warn' 130 | assets: 131 | files: [{ 132 | expand: yes 133 | cwd: 'src' 134 | src: [ '*.coffee', '**/*.coffee' ] 135 | }] 136 | 137 | uglify: 138 | compile: 139 | files: [{ 140 | expand: yes 141 | cwd: 'lib' 142 | src: [ '*.js', '**/*.js' ] 143 | dest: 'lib' 144 | }] 145 | 146 | nodewebkit: 147 | options: 148 | mac: on 149 | win: on 150 | linux32: on 151 | linux64: on 152 | version: pkg.nwversion 153 | app_name: pkg.name 154 | app_version: pkg.version 155 | mac_icns: 'var/teitoku.icns' 156 | build_dir: 'build' 157 | src: [ 'lib/**/*' ] 158 | 159 | compress: 160 | osx: 161 | options: 162 | archive: "release/teitoku-#{pkg.version}-osx.zip" 163 | files: [{ 164 | expand: yes 165 | cwd: 'build/releases/Teitoku/mac' 166 | src: [ '**' ] 167 | dest: 'teitoku-osx' 168 | filter: 'isFile' 169 | }] 170 | win: 171 | options: 172 | archive: "release/teitoku-#{pkg.version}-win32.zip" 173 | files: [{ 174 | expand: yes 175 | cwd: 'build/releases/Teitoku/win' 176 | src: [ '**' ] 177 | dest: 'teitoku-win32' 178 | filter: 'isFile' 179 | }] 180 | linux32: 181 | options: 182 | archive: "release/teitoku-#{pkg.version}-linux32.zip" 183 | files: [{ 184 | expand: yes 185 | cwd: 'build/releases/Teitoku/linux32' 186 | src: [ '**' ] 187 | dest: 'teitoku-linux32' 188 | filter: 'isFile' 189 | }] 190 | linux64: 191 | options: 192 | archive: "release/teitoku-#{pkg.version}-linux64.zip" 193 | files: [{ 194 | expand: yes 195 | cwd: 'build/releases/Teitoku/linux64' 196 | src: [ '**' ] 197 | dest: 'teitoku-linux64' 198 | filter: 'isFile' 199 | }] 200 | 201 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | # Teitoku Change History 2 | 3 | ## 0.3.2 4 | 5 | * Flashがインストールされていない環境への警告を追加 6 | * 仕様変更に伴い不要となったライブラリを削除 7 | 8 | ## 0.3.1 9 | 10 | * ショートカットが使えないバグの修正 11 | 12 | ## 0.3.0 13 | 14 | * 仕様変更への対応 15 | * ライブラリのアップデート 16 | 17 | ## 0.2.9 18 | 19 | * 高速化、ライブラリのアップデート 20 | 21 | ## 0.2.8 22 | 23 | * 高速化、一部機能の不具合を修正 24 | 25 | ## 0.2.7 26 | 27 | * Windowsで右クリックすると落ちる現象を修正しました 28 | 29 | ## 0.2.6 30 | 31 | * 一部機能の変更 32 | * Linux版をリリース 33 | 34 | ## 0.2.5 35 | 36 | * キャプチャ機能をつけました 37 | * ウィンドウをオリジナルサイズへ戻すオプションをつけました 38 | * ウィンドウを常に最前面表示するオプションをつけました 39 | 40 | ## 0.2.4 41 | 42 | * 通信状況に応じて再生速度を優先する設定にしました 43 | * アップデートをチェックする機能を追加しました 44 | 45 | ## 0.2.3 46 | 47 | * ログインに失敗するとその後ログインできなくなるバグを修正しました 48 | 49 | ## 0.2.1 50 | 51 | * Windowsに対応しました 52 | * 起動中画面右下にバージョンを表示するようにしました 53 | * 起動中画面にメッセージを表示するようにしました 54 | 55 | ## 0.1.0 56 | 57 | * ログインできないバグを修正しました 58 | 59 | ## 0.0.0 60 | 61 | * Mac OSXに対応しました -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Teitoku 2 | 3 | ![](https://raw.githubusercontent.com/geta6/teitoku/master/var/teitoku.png) 4 | 5 | ## build 6 | 7 | ``` 8 | npm i -g grunt-cli 9 | npm i 10 | bower i 11 | grunt 12 | ``` 13 | 14 | ## release (archiving) 15 | 16 | ``` 17 | grunt compress 18 | ``` 19 | 20 | ## download 21 | 22 | [download releases](https://github.com/geta6/teitoku/releases) 23 | 24 | ## contributors 25 | 26 | ``` 27 | @shokai 28 | ``` 29 | 30 | ## license 31 | 32 | MIT 33 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Teitoku", 3 | "private": true, 4 | "dependencies": { 5 | "jquery": "~2.1.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Teitoku", 3 | "version": "0.3.2", 4 | "nwversion": "0.9.2", 5 | "description": "kancolle browser", 6 | "main": "app.html", 7 | "window": { 8 | "title": "Teitoku", 9 | "icon": "img/icon.png", 10 | "toolbar": false, 11 | "frame": true, 12 | "width": 800, 13 | "height": 480 14 | }, 15 | "webkit": { 16 | "plugin": true, 17 | "page-cache": true 18 | }, 19 | "dependencies": { 20 | "coffeelint": "^1.3.0", 21 | "coffeelint-stylish": "0.0.1", 22 | "grunt": "^0.4.4", 23 | "grunt-coffeelint": "0.0.10", 24 | "grunt-contrib-clean": "^0.5.0", 25 | "grunt-contrib-coffee": "^0.10.1", 26 | "grunt-contrib-compress": "^0.8.0", 27 | "grunt-contrib-copy": "^0.5.0", 28 | "grunt-contrib-jade": "^0.11.0", 29 | "grunt-contrib-stylus": "^0.15.1", 30 | "grunt-contrib-uglify": "^0.4.0", 31 | "grunt-node-webkit-builder": "^0.1.21", 32 | "grunt-notify": "^0.3.0" 33 | }, 34 | "devDependencies": {}, 35 | "scripts": { 36 | "test": "echo \"Error: no test specified\" && exit 1" 37 | }, 38 | "repository": { 39 | "type": "git", 40 | "url": "git://github.com/geta6/teitoku.git" 41 | }, 42 | "author": "geta6", 43 | "license": "MIT", 44 | "bugs": { 45 | "url": "https://github.com/geta6/teitoku/issues" 46 | }, 47 | "homepage": "https://github.com/geta6/teitoku" 48 | } 49 | -------------------------------------------------------------------------------- /src/app.coffee: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | fs = require 'fs' 4 | path = require 'path' 5 | gui = require 'nw.gui' 6 | 7 | # gui.Window.get().showDevTools() 8 | 9 | $win = $ window 10 | $doc = $ document 11 | $frame = null 12 | $frwin = null 13 | $forms = null 14 | $waits = null 15 | $embed = null 16 | $modal = null 17 | $helps = null 18 | 19 | 20 | $state = 21 | modal: null 22 | float: no 23 | klock: no 24 | start: 25 | width: gui.Window.get().width 26 | height: gui.Window.get().height 27 | 28 | 29 | $win.on 'app:init', -> 30 | console.debug 'app:init' 31 | 32 | $frame = $ '#frame' 33 | $waits = $ '#waits' 34 | $embed = $ '#embed' 35 | $modal = $ '#modal' 36 | $helps = $ '#helps' 37 | 38 | $waits.fadeIn 60 39 | 40 | unless $frame.size() 41 | $frame = ($ '