narou 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of narou might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1b88dda14d27df87b223b955080399ab463b85c
4
- data.tar.gz: 775e0021c08b61a3514933bc9985a6a6e5388ce4
3
+ metadata.gz: b352a9501e2defa27247b21d6d676e61e42f9b6c
4
+ data.tar.gz: 9acd3e424e665a16a6070df23631e8911703baf0
5
5
  SHA512:
6
- metadata.gz: 916f254b9ebd6929c347d91bf64e8e601695df500ae9858c68c1c1c408cbcdefb30b970c7aa7460a570de7cfc6a7605762490a69798b272424563de5c8c99ea6
7
- data.tar.gz: d7eee8b807d27cd7ce2912495f526fc6c52c5991b94263a73d408fdbc8d4ed90688fe3794e9e2233ad2145461527299dd0061434badd5d28adebe54a77868651
6
+ metadata.gz: e60c0651786cba31703bff04f9454c340f6d7081e305331cb9ab98bbf3849f217031e669fef19d8a2e1ac73dea4873a8f829041f842a09f7def1710020ba56e4
7
+ data.tar.gz: d4cb83fdd7df2c92e2123696b6bae8e71dc1fe38df23443acf0816fea423171fe42c7850b3e828f7b6889c26bb6cb13209d7faaad1a562554582c9a6cf2e6a1f
@@ -2,6 +2,18 @@
2
2
  更新履歴 - ChangeLog
3
3
  ====================
4
4
 
5
+ 3.1.2 : 2017/06/10
6
+ ------------------
7
+ #### 追加機能
8
+ - WEB UIにおいて、フィルターに入力されている状況をアドレスバーに反映するように
9
+ しました。(ブックマークなどをすることでフィルターの状況を記憶・再現出来ます)
10
+
11
+ #### 修正内容
12
+ - WEB UIにおいて、凍結状態の表示状態に関わらず小説データを内部で取得していた事
13
+ により、表示速度が低下していたのを修正しました
14
+ - 暁の常時 https 化に対応
15
+
16
+
5
17
  3.1.1 : 2017/04/05
6
18
  ------------------
7
19
  #### 追加機能
data/README.md CHANGED
@@ -33,6 +33,18 @@ Narou.rb ― 「小説家になろう」「小説を読もう!」ダウンロ
33
33
  更新履歴 - ChangeLog
34
34
  --------------------
35
35
 
36
+ 3.1.2 : 2017/06/10
37
+ ------------------
38
+ #### 追加機能
39
+ - WEB UIにおいて、フィルターに入力されている状況をアドレスバーに反映するように
40
+ しました。(ブックマークなどをすることでフィルターの状況を記憶・再現出来ます)
41
+
42
+ #### 修正内容
43
+ - WEB UIにおいて、凍結状態の表示状態に関わらず小説データを内部で取得していた事
44
+ により、表示速度が低下していたのを修正しました
45
+ - 暁の常時 https 化に対応
46
+
47
+
36
48
  3.1.1 : 2017/04/05
37
49
  ------------------
38
50
  #### 追加機能
@@ -17,12 +17,16 @@ module Command
17
17
  end
18
18
 
19
19
  def initialize
20
- super("")
20
+ super("[options]")
21
21
  if Narou.already_init?
22
22
  initialize_already_init
23
23
  else
24
24
  initialize_init_yet
25
25
  end
26
+ @opt.on("-p", "--path FOLDER", "指定したフォルダの AozoraEpub3 を利用する") { |dirname|
27
+ # no check here since global_setting is not loaded yet
28
+ @aozora_dirname = dirname
29
+ }
26
30
  end
27
31
 
28
32
  def initialize_init_yet
@@ -33,6 +37,9 @@ module Command
33
37
 
34
38
  Examples:
35
39
  narou init
40
+ narou init -p /opt/narou/aozora # AozoraEpub3 のフォルダを直接指定
41
+
42
+ Options:
36
43
  EOS
37
44
  end
38
45
 
@@ -43,6 +50,10 @@ module Command
43
50
 
44
51
  Examples:
45
52
  narou init
53
+ narou init -p /opt/narou/aozora # AozoraEpub3 のフォルダを直接指定
54
+ narou init -p :keep # 設定済みと同じ場所を指定
55
+
56
+ Options:
46
57
  EOS
47
58
  end
48
59
 
@@ -70,7 +81,11 @@ module Command
70
81
  puts "<bold><red>#{"!!!WARNING!!!".center(70)}</red></bold>".termcolor
71
82
  puts "AozoraEpub3の構成ファイルを書き換えます。narouコマンド用に別途新規インストールしておくことをオススメします"
72
83
  end
73
- aozora_path = ask_aozoraepub3_path
84
+ if @aozora_dirname
85
+ path = normalize_aozoraepub3_path(@aozora_dirname)
86
+ print "\n<bold><green>指定されたフォルダにAozoraEpub3がありません。</green></bold>\n".termcolor unless path
87
+ end
88
+ aozora_path = path || ask_aozoraepub3_path
74
89
  unless aozora_path
75
90
  puts "設定をスキップしました。あとで " + "<bold><yellow>narou init</yellow></bold>".termcolor + " で再度設定出来ます"
76
91
  return
@@ -119,26 +134,30 @@ module Command
119
134
  end
120
135
  print ")\n>"
121
136
  while input = $stdin.gets
122
- if Helper.os_windows?
123
- input.force_encoding(Encoding::Windows_31J).encode!(Encoding::UTF_8)
124
- end
125
- input = input.strip.gsub(/"/, "")
126
- path = File.expand_path(input)
127
- case
128
- when input == ":keep"
129
- aozora_dir = @global_setting["aozoraepub3dir"]
130
- if aozora_dir && Narou.aozoraepub3_directory?(aozora_dir)
131
- return aozora_dir
132
- end
133
- when Narou.aozoraepub3_directory?(path)
134
- return path
135
- when input == ""
136
- break
137
- end
137
+ break if input.strip! == ""
138
+ checked_input = normalize_aozoraepub3_path(input)
139
+ return checked_input if checked_input
138
140
  print "\n<bold><green>入力されたフォルダにAozoraEpub3がありません。" \
139
141
  "もう一度入力して下さい:</green></bold>\n&gt;".termcolor
140
142
  end
141
143
  nil
142
144
  end
145
+
146
+ def normalize_aozoraepub3_path(input)
147
+ if Helper.os_windows?
148
+ input.force_encoding(Encoding::Windows_31J).encode!(Encoding::UTF_8)
149
+ end
150
+ input.delete!("\"")
151
+ path = File.expand_path(input)
152
+ if input == ":keep"
153
+ aozora_dir = @global_setting["aozoraepub3dir"]
154
+ if aozora_dir && Narou.aozoraepub3_directory?(aozora_dir)
155
+ return aozora_dir
156
+ end
157
+ elsif Narou.aozoraepub3_directory?(path)
158
+ return path
159
+ end
160
+ nil
161
+ end
143
162
  end
144
163
  end
@@ -511,7 +511,13 @@ module Command
511
511
  tab: :global
512
512
  },
513
513
  "server-bind" => {
514
- type: :string, help: "WEBサーバのホスト制限(未設定時:起動PCのIP)。頻繁にローカルIPが変わってしまう場合は127.0.0.1の指定を推奨", invisible: true,
514
+ type: :string, help: "WEBサーバのホスト制限(未設定時:起動PCのIP)。頻繁にローカルIPが変わってしまう場合は127.0.0.1の指定を推奨",
515
+ invisible: true,
516
+ tab: :global
517
+ },
518
+ "server-ws-add-accepted-domains" => {
519
+ type: :string, help: "PushServer の accepted_domains に追加するホストのリスト(カンマ区切り)",
520
+ invisible: true,
515
521
  tab: :global
516
522
  },
517
523
  "over18" => {
@@ -62,7 +62,18 @@ module Command
62
62
  def create_push_server(params)
63
63
  host, port = params[:host], params[:port]
64
64
  push_server = Narou::PushServer.instance
65
- push_server.accepted_domains = (host == "0.0.0.0" ? "*" : host)
65
+ accepted_domains = (host == "0.0.0.0" ? "*" : host)
66
+ if accepted_domains != "*"
67
+ global_setting = Inventory.load("global_setting", :global)
68
+ addtional_accepted_domains = global_setting["server-ws-add-accepted-domains"]
69
+ if addtional_accepted_domains
70
+ accepted_domains = [
71
+ accepted_domains,
72
+ addtional_accepted_domains.split(",").map(&:strip)
73
+ ].flatten
74
+ end
75
+ end
76
+ push_server.accepted_domains = accepted_domains
66
77
  push_server.port = port + 1
67
78
  push_server.host = host
68
79
  push_server
@@ -91,7 +91,15 @@ class ConverterBase
91
91
  #
92
92
  def convert_numbers(data)
93
93
  # 小数点を・に
94
- data.gsub!(/([\d0-9#{KANJI_NUM}]+?)[\..]([\d0-9#{KANJI_NUM}]+?)/, "\\1・\\2")
94
+ data.gsub!(/([\d0-9#{KANJI_NUM}]+?)[\..]([\d0-9#{KANJI_NUM}]+?)/) do |match|
95
+ integer = $1
96
+ decimal = $2
97
+ if [/\d/, /[0-9]/, /[#{KANJI_NUM}]/].any? { |r| integer[-1] =~ r && decimal[0] =~ r }
98
+ "#{integer}・#{decimal}"
99
+ else
100
+ match
101
+ end
102
+ end
95
103
  if @setting.enable_convert_num_to_kanji &&
96
104
  @text_type != "subtitle" && @text_type != "chapter" && @text_type != "story"
97
105
  num_to_kanji(data)
@@ -1,12 +1,13 @@
1
1
 
2
2
  require "open-uri"
3
+ require "openssl"
3
4
 
4
5
  # open-uri で http → https へのリダイレクトを有効にする
5
6
  require "open_uri_redirections"
6
7
 
7
8
  # open-uri に渡すオプションを生成(必要に応じて extensions/*.rb でオーバーライドする)
8
9
  def make_open_uri_options(add)
9
- add
10
+ add.merge(ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE)
10
11
  end
11
12
 
12
13
  #
@@ -40,9 +40,3 @@ if Dir.tmpdir !~ /\A[ -~]+\z/
40
40
  File.expand_path(File.join(ENV["SystemRoot"], "Temp"))
41
41
  end
42
42
  end
43
-
44
- require "openssl"
45
-
46
- def make_open_uri_options(add)
47
- add.merge(ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE)
48
- end
@@ -3,4 +3,4 @@
3
3
  # Copyright 2013 whiteleaf. All rights reserved.
4
4
  #
5
5
 
6
- Version = "3.1.1"
6
+ Version = "3.1.2"
@@ -3,6 +3,9 @@
3
3
  # Copyright 2013 whiteleaf. All rights reserved.
4
4
  #
5
5
 
6
+ # rubocop:disable Metrics/ClassLength
7
+ # rubocop:disable Style/ClassAndModuleChildren
8
+
6
9
  require "socket"
7
10
  require "sinatra/base"
8
11
  require "sinatra/json"
@@ -114,6 +117,17 @@ module Narou::ServerHelpers
114
117
  def notepad_text_path
115
118
  File.join(Narou.local_setting_dir, "notepad.txt")
116
119
  end
120
+
121
+ def query_to_boolean(value, default: false)
122
+ case value
123
+ when "1", 1, "true", true
124
+ true
125
+ when "0", 0, "false", false
126
+ false
127
+ else
128
+ default
129
+ end
130
+ end
117
131
  end
118
132
 
119
133
  class Narou::AppServer < Sinatra::Base
@@ -512,14 +526,19 @@ class Narou::AppServer < Sinatra::Base
512
526
  # -------------------------------------------------------------------------------
513
527
 
514
528
  get "/api/list" do
529
+ view_frozen = query_to_boolean(params["view_frozen"], default: true)
530
+ view_nonfrozen = query_to_boolean(params["view_nonfrozen"], default: true)
515
531
  database_values = Database.instance.get_object.values
516
532
  json_objects = {
517
- draw: 1, recordsTotal: database_values.count, recordsFiltered: database_values.count
533
+ draw: 1
518
534
  }
519
535
  json_objects[:data] =
520
536
  database_values.map do |data|
521
- tags = data["tags"] || []
522
537
  id = data["id"]
538
+ is_frozen = Narou.novel_frozen?(id)
539
+ next nil if !view_frozen && is_frozen
540
+ next nil if !view_nonfrozen && !is_frozen
541
+ tags = data["tags"] || []
523
542
  {
524
543
  id: id.to_s,
525
544
  last_update: data["last_update"].to_i,
@@ -530,19 +549,21 @@ class Narou::AppServer < Sinatra::Base
530
549
  novel_type: data["novel_type"] == 2 ? "短編" : "連載",
531
550
  tags: (tags.empty? ? "" : decorate_tags(tags) + '&nbsp;<span class="tag label label-white" data-tag="" data-toggle="tooltip" title="タグ検索を解除">&nbsp;</span>'),
532
551
  status: [
533
- Narou.novel_frozen?(id) ? "凍結" : nil,
552
+ is_frozen ? "凍結" : nil,
534
553
  tags.include?("end") ? "完結" : nil,
535
554
  tags.include?("404") ? "削除" : nil,
536
555
  ].compact.join(", "),
537
556
  download: %!<a href="/novels/#{id}/download" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-download-alt"></span></a>!,
538
- frozen: Narou.novel_frozen?(id),
557
+ frozen: is_frozen,
539
558
  new_arrivals_date: data["new_arrivals_date"].tap { |m| break m.to_i if m },
540
559
  general_lastup: data["general_lastup"].tap { |m| break m.to_i if m },
541
560
  # 掲載話数
542
561
  general_all_no: data["general_all_no"],
543
562
  last_check_date: data["last_check_date"].tap { |m| break m.to_i if m },
544
563
  }
545
- end
564
+ end.compact
565
+ json_objects[:recordsTotal] = json_objects[:data].size
566
+ json_objects[:recordsFiltered] = json_objects[:recordsTotal]
546
567
  json json_objects
547
568
  end
548
569
 
@@ -1236,6 +1236,7 @@ var Narou = (function() {
1236
1236
 
1237
1237
  // dataTables は search() に渡された文字列しか自動保存しないので、タグ含めて自前で保存
1238
1238
  storage.set("filter_string", filter_string).save();
1239
+ Location.replaceHash(filter_string);
1239
1240
  },
1240
1241
 
1241
1242
  search: function(sync) {
@@ -1813,5 +1814,41 @@ var Narou = (function() {
1813
1814
  }
1814
1815
  };
1815
1816
 
1817
+ /*************************************************************************
1818
+ * location.hash 管理
1819
+ *************************************************************************/
1820
+ var Location = Narou.Location = {
1821
+ getFilterString: function() {
1822
+ var hash = Location.decodeHash();
1823
+ if (hash.length) {
1824
+ return hash;
1825
+ }
1826
+ else {
1827
+ return storage.get("filter_string");
1828
+ }
1829
+ },
1830
+
1831
+ registerEvent: function() {
1832
+ $(window).on('hashchange', function(e) {
1833
+ $("#myFilter").val(Location.decodeHash());
1834
+ Search.get().search();
1835
+ });
1836
+ },
1837
+
1838
+ replaceHash: function(string) {
1839
+ // hashchange イベントは発火したくないので location.hash での書き換えはしない
1840
+ var value = string;
1841
+ if (string.trim().length) {
1842
+ value = "#" + value;
1843
+ }
1844
+ // pushState でやると、入力途中のデータでも履歴が残る可能性が高いので書き換えだけにする
1845
+ history.replaceState("", "", "/" + value);
1846
+ },
1847
+
1848
+ decodeHash: function() {
1849
+ return decodeURIComponent(location.hash.replace(/^#/, '')).trim();
1850
+ }
1851
+ };
1852
+
1816
1853
  return Narou;
1817
1854
  })();
@@ -8,6 +8,7 @@ $(document).ready(function() {
8
8
 
9
9
  var touchable_device = "ontouchstart" in window;
10
10
  var click_event_name = (touchable_device ? "touchstart" : "click");
11
+ var storage = new Narou.Storage();
11
12
 
12
13
  var datatables_init_completed = false;
13
14
 
@@ -90,8 +91,75 @@ $(document).ready(function() {
90
91
  });
91
92
  }
92
93
 
94
+ function tableReload() {
95
+ notification.trigger("table.reload");
96
+ }
97
+
98
+ /*
99
+ * 凍結の表示状態制御
100
+ */
101
+ var visibility_frozen_novel, visibility_nonfrozen_novel;
102
+
103
+ $.fn.dataTable.ext.search.push(function(settings, data, dataIndex) {
104
+ var state_frozen = table.row(dataIndex).data().frozen;
105
+ if (state_frozen) {
106
+ return visibility_frozen_novel;
107
+ }
108
+ else {
109
+ return visibility_nonfrozen_novel;
110
+ }
111
+ });
112
+
113
+ function restoreVisibilityForViewMenu() {
114
+ visibility_frozen_novel = storage.get("visibility_frozen_novel");
115
+ visibility_nonfrozen_novel = storage.get("visibility_nonfrozen_novel");
116
+ var visibility_open_new_tab = storage.get("open_new_tab_setting_pages");
117
+ var visibility_buttons_hide_page_top = !storage.get("buttons_hide_page_top");
118
+ var visibility_buttons_fix_footer = storage.get("buttons_fix_footer");
119
+ if (typeof visibility_frozen_novel === "undefined")
120
+ visibility_frozen_novel = true;
121
+ if (typeof visibility_nonfrozen_novel === "undefined")
122
+ visibility_nonfrozen_novel = true;
123
+ if (typeof visibility_open_new_tab === "undefined")
124
+ visibility_open_new_tab = false;
125
+ if (typeof visibility_buttons_hide_page_top === "undefined")
126
+ visibility_buttons_hide_page_top = true;
127
+ if (typeof visibility_buttons_fix_footer === "undefined")
128
+ visibility_buttons_fix_footer = false;
129
+ // メニューのチェック状態も復元
130
+ var method = ["removeClass", "addClass"];
131
+ $("#action-view-frozen")[method[visibility_frozen_novel | 0]]("active");
132
+ $("#action-view-nonfrozen")[method[visibility_nonfrozen_novel | 0]]("active");
133
+ $("#action-view-toggle-setting-page-open-new-tab")[method[visibility_open_new_tab | 0]]("active");
134
+ $("#action-view-toggle-buttons-show-page-top")[method[visibility_buttons_hide_page_top | 0]]("active");
135
+ $("#action-view-toggle-buttons-fix-footer")[method[visibility_buttons_fix_footer | 0]]("active");
136
+ }
137
+
138
+ restoreVisibilityForViewMenu();
139
+
140
+ function saveVisibilityFrozen() {
141
+ storage.set("visibility_frozen_novel", visibility_frozen_novel);
142
+ storage.set("visibility_nonfrozen_novel", visibility_nonfrozen_novel);
143
+ storage.save();
144
+ }
145
+
146
+ function toggleVisibilityFrozen() {
147
+ visibility_frozen_novel = !visibility_frozen_novel;
148
+ }
149
+
150
+ function toggleVisibilityNonFrozen() {
151
+ visibility_nonfrozen_novel = !visibility_nonfrozen_novel;
152
+ }
153
+
154
+ /*
155
+ * 小説リスト設定
156
+ */
157
+ function createAjaxUrl() {
158
+ return "/api/list?view_frozen=" + visibility_frozen_novel + "&view_nonfrozen=" + visibility_nonfrozen_novel;
159
+ }
160
+
93
161
  var table = t = $("#novel-list").DataTable({
94
- ajax: "/api/list",
162
+ ajax: createAjaxUrl(),
95
163
  dom: (touchable_device ? 'lprtpi' : 'Rlprtpi'),
96
164
  stateSave: true,
97
165
  stateDuration: 0, // tableの状態保存を永続化
@@ -381,13 +449,12 @@ $(document).ready(function() {
381
449
  // initComplete イベントが発火する前に一度この reorderCallback が発火されるので、
382
450
  // 無駄なリロードをしないように初期化後のみ有効にする
383
451
  if (datatables_init_completed) {
384
- notification.trigger("table.reload");
452
+ tableReload();
385
453
  }
386
454
  },
387
455
  },
388
456
  });
389
457
 
390
- var storage = new Narou.Storage();
391
458
  var action = new Narou.Action(table);
392
459
  var notification = Narou.Notification.instance();
393
460
  var stream_console = new Narou.Console;
@@ -399,7 +466,7 @@ $(document).ready(function() {
399
466
  /*
400
467
  * フィルターの文字列を復元
401
468
  */
402
- var filter_string = storage.get("filter_string");
469
+ var filter_string = Narou.Location.getFilterString();
403
470
  if (filter_string) {
404
471
  $("#myFilter").val(filter_string);
405
472
  $("#myFilter-clear").show();
@@ -407,62 +474,7 @@ $(document).ready(function() {
407
474
  else {
408
475
  $("#myFilter-clear").hide();
409
476
  }
410
-
411
- /*
412
- * 凍結の表示状態制御
413
- */
414
- var visibility_frozen_novel, visibility_nonfrozen_novel;
415
-
416
- $.fn.dataTable.ext.search.push(function(settings, data, dataIndex) {
417
- var state_frozen = table.row(dataIndex).data().frozen;
418
- if (state_frozen) {
419
- return visibility_frozen_novel;
420
- }
421
- else {
422
- return visibility_nonfrozen_novel;
423
- }
424
- });
425
-
426
- function restoreVisibilityForViewMenu() {
427
- visibility_frozen_novel = storage.get("visibility_frozen_novel");
428
- visibility_nonfrozen_novel = storage.get("visibility_nonfrozen_novel");
429
- var visibility_open_new_tab = storage.get("open_new_tab_setting_pages");
430
- var visibility_buttons_hide_page_top = !storage.get("buttons_hide_page_top");
431
- var visibility_buttons_fix_footer = storage.get("buttons_fix_footer");
432
- if (typeof visibility_frozen_novel === "undefined")
433
- visibility_frozen_novel = true;
434
- if (typeof visibility_nonfrozen_novel === "undefined")
435
- visibility_nonfrozen_novel = true;
436
- if (typeof visibility_open_new_tab === "undefined")
437
- visibility_open_new_tab = false;
438
- if (typeof visibility_buttons_hide_page_top === "undefined")
439
- visibility_buttons_hide_page_top = true;
440
- if (typeof visibility_buttons_fix_footer === "undefined")
441
- visibility_buttons_fix_footer = false;
442
- // メニューのチェック状態も復元
443
- var method = ["removeClass", "addClass"];
444
- $("#action-view-frozen")[method[visibility_frozen_novel | 0]]("active");
445
- $("#action-view-nonfrozen")[method[visibility_nonfrozen_novel | 0]]("active");
446
- $("#action-view-toggle-setting-page-open-new-tab")[method[visibility_open_new_tab | 0]]("active");
447
- $("#action-view-toggle-buttons-show-page-top")[method[visibility_buttons_hide_page_top | 0]]("active");
448
- $("#action-view-toggle-buttons-fix-footer")[method[visibility_buttons_fix_footer | 0]]("active");
449
- }
450
-
451
- restoreVisibilityForViewMenu();
452
-
453
- function saveVisibilityFrozen() {
454
- storage.set("visibility_frozen_novel", visibility_frozen_novel);
455
- storage.set("visibility_nonfrozen_novel", visibility_nonfrozen_novel);
456
- storage.save();
457
- }
458
-
459
- function toggleVisibilityFrozen() {
460
- visibility_frozen_novel = !visibility_frozen_novel;
461
- }
462
-
463
- function toggleVisibilityNonFrozen() {
464
- visibility_nonfrozen_novel = !visibility_nonfrozen_novel;
465
- }
477
+ Narou.Location.registerEvent();
466
478
 
467
479
  /*
468
480
  * テーブルリロードイベント定義
@@ -476,7 +488,7 @@ $(document).ready(function() {
476
488
  selected_ids.push(data.id);
477
489
  }
478
490
  });
479
- table.ajax.reload(function() {
491
+ table.ajax.url(createAjaxUrl()).load(function() {
480
492
  // リロードしたら状態は解除されているので復元
481
493
  table.eachRow(function(row, data) {
482
494
  if ($.inArray(data.id, selected_ids) !== -1) {
@@ -888,7 +900,7 @@ $(document).ready(function() {
888
900
  $(this).toggleClass("active");
889
901
  toggleVisibilityNonFrozen();
890
902
  saveVisibilityFrozen();
891
- table.draw();
903
+ tableReload();
892
904
  });
893
905
 
894
906
  /*
@@ -901,7 +913,7 @@ $(document).ready(function() {
901
913
  $(this).toggleClass("active");
902
914
  toggleVisibilityFrozen();
903
915
  saveVisibilityFrozen();
904
- table.draw();
916
+ tableReload();
905
917
  });
906
918
 
907
919
  /*
@@ -1398,7 +1410,7 @@ $(document).ready(function() {
1398
1410
  * ○件表示の横のリロードアイコン
1399
1411
  */
1400
1412
  $("#icon-refresh-table").on("click", function(e) {
1401
- notification.trigger("table.reload");
1413
+ tableReload();
1402
1414
  });
1403
1415
 
1404
1416
  /*
@@ -32,6 +32,18 @@ Gem::Specification.new do |gem|
32
32
  install_message = <<-EOS
33
33
  #{"*" * 60}
34
34
 
35
+ 3.1.2 : 2017/06/10
36
+ ------------------
37
+ #### 追加機能
38
+ - WEB UIにおいて、フィルターに入力されている状況をアドレスバーに反映するように
39
+ しました。(ブックマークなどをすることでフィルターの状況を記憶・再現出来ます)
40
+
41
+ #### 修正内容
42
+ - WEB UIにおいて、凍結状態の表示状態に関わらず小説データを内部で取得していた事
43
+ により、表示速度が低下していたのを修正しました
44
+ - 暁の常時 https 化に対応
45
+
46
+
35
47
  3.1.1 : 2017/04/05
36
48
  ------------------
37
49
  #### 追加機能
data/narou.rb CHANGED
@@ -51,7 +51,7 @@ rescue SyntaxError => e
51
51
  warn e
52
52
  exit Narou::EXIT_ERROR_CODE
53
53
  rescue rescue_level => e
54
- warn $@.shift + ": #{e.message.encode(Encoding::UTF_8)} (#{e.class})"
54
+ warn "#{$@.shift}: #{e.message.encode(Encoding::UTF_8)} (#{e.class})"
55
55
  if $display_backtrace
56
56
  $@.each do |b|
57
57
  warn " from #{b}"
@@ -0,0 +1,45 @@
1
+ # ------------------------------------------------------------
2
+ # 小説サイト定義
3
+ name: 暁
4
+ scheme: https
5
+ domain: www.akatsuki-novels.com
6
+ top_url: \\k<scheme>://\\k<domain>
7
+ url: \\k<top_url>/stories/index/novel_id\~(?<ncode>\d+)
8
+ encoding: UTF-8
9
+ confirm_over18: no
10
+ append_title_to_folder_name: yes
11
+ title_strip_pattern: null
12
+ cookie: CakeCookie[ALLOWED_ADULT_NOVEL]=on
13
+
14
+ # ------------------------------------------------------------
15
+ # 書籍情報取得設定
16
+ title: id="LookNovel">(?<title>.+?)</a>
17
+ author: 作者:<a href="/users/view/\d+">(?<author>.+?)</a>
18
+ story: |-
19
+ <div class=" body-x1 body-normal body-w\d+">.+?<div>(?<story>.+?)</div>
20
+
21
+ # ------------------------------------------------------------
22
+ # 目次取得設定
23
+ toc_url: \\k<top_url>/stories/index/novel_id~\\k<ncode>
24
+ subtitles: |-
25
+ (?:<tr><td style="border: 0; padding: 0;word-break:break-all;" colspan=\\"2\\"><b>(?<chapter>.+?)</b></td></tr>)*<tr><td>( )?<a href="(?<href>/stories/view/(?<index>\d+)/novel_id\~\d+)">(?<subtitle>.+?)</a> </td><td class="font-s">(?<subupdate>.+?) </td></tr>
26
+
27
+ # subdate(初投稿日)がない場合、一番最初のsubupdateで代用する
28
+ subdate: no
29
+
30
+ error_message: この小説は作者の諸事情により非公開にしています
31
+
32
+ # ------------------------------------------------------------
33
+ # 本文取得設定
34
+ body_pattern: |-
35
+ </h2>(?:<div>&nbsp;</div><div><b>前書き</b></div><div class="body-novel">(?<introduction>.+?)&nbsp;</div><hr width="100%"><div>&nbsp;</div>)?<div class="body-novel">(?<body>.+?)&nbsp;</div>(?:<div>&nbsp;</div><hr width="100%"><div>&nbsp;</div><div><b>後書き</b></div><div class="body-novel">(?<postscript>.+?)&nbsp;</div>)?
36
+
37
+ introduction_pattern: null
38
+ postscript_pattern: null
39
+
40
+ illust_current_url: null
41
+ illust_grep_pattern: <img src="(?<src>.+?)" />
42
+
43
+ # ------------------------------------------------------------
44
+ # 小説情報からパースするための設定
45
+ novel_info_url: null
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: narou
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - whiteleaf7
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-05 00:00:00.000000000 Z
11
+ date: 2017-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: termcolorlight
@@ -473,6 +473,7 @@ files:
473
473
  - template/replace.txt.erb
474
474
  - template/setting.ini.erb
475
475
  - webnovel/https.syosetu.org.yaml
476
+ - webnovel/https.www.akatsuki-novels.com.yaml
476
477
  - webnovel/kakuyomu.jp.yaml
477
478
  - webnovel/ncode.syosetu.com.yaml
478
479
  - webnovel/novel18.syosetu.com.yaml
@@ -486,6 +487,18 @@ metadata: {}
486
487
  post_install_message: |
487
488
  ************************************************************
488
489
 
490
+ 3.1.2 : 2017/06/10
491
+ ------------------
492
+ #### 追加機能
493
+ - WEB UIにおいて、フィルターに入力されている状況をアドレスバーに反映するように
494
+ しました。(ブックマークなどをすることでフィルターの状況を記憶・再現出来ます)
495
+
496
+ #### 修正内容
497
+ - WEB UIにおいて、凍結状態の表示状態に関わらず小説データを内部で取得していた事
498
+ により、表示速度が低下していたのを修正しました
499
+ - 暁の常時 https 化に対応
500
+
501
+
489
502
  3.1.1 : 2017/04/05
490
503
  ------------------
491
504
  #### 追加機能