Jelajahi Sumber

Merge pull request #2150 from openNAMU/dev

일부 디자인 수정
잉여개발기 2 tahun lalu
induk
melakukan
bc2b57ae4b
58 mengubah file dengan 942 tambahan dan 550 penghapusan
  1. 17 7
      app.py
  2. 33 28
      emergency_tool.py
  3. 0 1
      lang/en-US.json
  4. 0 1
      lang/ko-KR.json
  5. 2 2
      route/__init__.py
  6. 22 0
      route/go_api_list_old_page.py
  7. 2 1
      route/go_api_list_recent_change.py
  8. 3 1
      route/go_api_list_recent_discuss.py
  9. 9 9
      route/go_api_w_render.py
  10. 0 30
      route/list_old_page.py
  11. 1 0
      route/main_tool_other.py
  12. 19 0
      route/n_list_old_page.py
  13. 1 4
      route/n_list_recent_change.py
  14. 6 9
      route/n_list_recent_discuss.py
  15. 3 1
      route/recent_change.py
  16. 0 80
      route/recent_discuss.py
  17. 55 9
      route/tool/func.py
  18. 11 1
      route/tool/func_render.py
  19. 1 2
      route/tool/func_render_namumark.py
  20. TEMPAT SAMPAH
      route_go/bin/main.amd64.bin
  21. TEMPAT SAMPAH
      route_go/bin/main.amd64.exe
  22. TEMPAT SAMPAH
      route_go/bin/main.arm64.bin
  23. TEMPAT SAMPAH
      route_go/bin/main.arm64.exe
  24. 1 0
      route_go/go.mod
  25. 2 0
      route_go/go.sum
  26. 25 19
      route_go/main.go
  27. 3 7
      route_go/route/api_bbs.go
  28. 3 7
      route_go/route/api_bbs_list.go
  29. 2 6
      route_go/route/api_func_auth_list.go
  30. 2 6
      route_go/route/api_func_ip.go
  31. 2 6
      route_go/route/api_func_language.go
  32. 2 6
      route_go/route/api_func_llm.go
  33. 2 3
      route_go/route/api_func_sha224.go
  34. 81 0
      route_go/route/api_list_old_page.go
  35. 42 9
      route_go/route/api_list_recent_change.go
  36. 44 13
      route_go/route/api_list_recent_discuss.go
  37. 3 7
      route_go/route/api_list_recent_edit_request.go
  38. 5 9
      route_go/route/api_search.go
  39. 3 7
      route_go/route/api_thread.go
  40. 5 0
      route_go/route/api_topic_list.go
  41. 4 9
      route_go/route/api_user_watch_list.go
  42. 2 6
      route_go/route/api_w_random.go
  43. 4 8
      route_go/route/api_w_raw.go
  44. 2 6
      route_go/route/api_w_render.go
  45. 4 9
      route_go/route/api_w_watch_list.go
  46. 3 7
      route_go/route/api_w_xref.go
  47. 2 3
      route_go/route/main_func_easter_egg.go
  48. 223 5
      route_go/route/tool/namumark.go
  49. 3 2
      route_go/route/tool/render.go
  50. 41 28
      route_go/windows_amd64.ps1
  51. 2 2
      version.json
  52. 22 1
      views/main_css/js/func/func.js
  53. 36 0
      views/main_css/js/route/list_old_page.js
  54. 137 125
      views/main_css/js/route/list_recent_change.js
  55. 44 44
      views/main_css/js/route/list_recent_discuss.js
  56. 0 1
      views/main_css/js/route/render.js
  57. 1 1
      views/main_css/js/route/view.js
  58. 0 2
      views/main_css/js/route/w_watch_list.js

+ 17 - 7
app.py

@@ -396,8 +396,11 @@ app.route('/filter/extension_filter/add', methods = ['POST', 'GET'], defaults =
 app.route('/filter/extension_filter/del/<everything:name>', defaults = { 'tool' : 'extension_filter' })(filter_all_delete)
 
 # Func-list
-app.route('/list/document/old')(list_old_page)
-app.route('/list/document/old/<int:num>')(list_old_page)
+app.route('/list/document/old', defaults = { 'set_type' : 'old' })(list_old_page)
+app.route('/list/document/old/<int:num>', defaults = { 'set_type' : 'old' })(list_old_page)
+
+app.route('/list/document/new', defaults = { 'set_type' : 'new' })(list_old_page)
+app.route('/list/document/new/<int:num>', defaults = { 'set_type' : 'new' })(list_old_page)
 
 app.route('/list/document/no_link')(list_no_link)
 app.route('/list/document/no_link/<int:num>')(list_no_link)
@@ -468,11 +471,14 @@ app.route('/block_log/regex/<int:num>', defaults = { 'tool' : 'regex' })(recent_
 app.route('/block_log/ongoing', defaults = { 'tool' : 'ongoing' })(recent_block)
 app.route('/block_log/ongoing/<int:num>', defaults = { 'tool' : 'ongoing' })(recent_block)
 
-# Func-history
 app.route('/recent_change')(list_recent_change)
 app.route('/recent_changes')(list_recent_change)
 app.route('/recent_change/<int:num>/<set_type>')(list_recent_change)
 
+app.route('/recent_discuss', defaults = { 'tool' : 'normal' })(list_recent_discuss)
+app.route('/recent_discuss/<int:num>/<tool>')(list_recent_discuss)
+
+# Func-history
 app.route('/recent_edit_request', defaults = { 'db_set' : db_set_str })(recent_edit_request)
 
 app.route('/record/<name>', defaults = { 'tool' : 'record' })(recent_change)
@@ -542,9 +548,6 @@ app.route('/revert/<int:num>/<everything:name>', methods = ['POST', 'GET'])(edit
 app.route('/move/<everything:name>', methods = ['POST', 'GET'])(edit_move)
 
 # Func-topic
-app.route('/recent_discuss', defaults = { 'tool' : 'normal' })(list_recent_discuss)
-app.route('/recent_discuss/<tool>')(list_recent_discuss)
-
 app.route('/thread/<int:topic_num>', methods = ['POST', 'GET'])(topic)
 app.route('/thread/0/<everything:doc_name>', defaults = { 'topic_num' : '0' }, methods = ['POST', 'GET'])(topic)
 app.route('/topic/<everything:name>', methods = ['POST', 'GET'])(topic_list)
@@ -659,6 +662,7 @@ app.route('/bbs/edit/<int:bbs_num>/<int:post_num>/<comment_num>', methods = ['PO
 app.route('/bbs/delete/<int:bbs_num>/<int:post_num>/<comment_num>', methods = ['POST', 'GET'])(bbs_w_delete)
 
 # Func-api
+## v1 API
 app.route('/api/render', methods = ['POST'], defaults = { 'db_set' : db_set_str })(api_w_render)
 app.route('/api/render/<tool>', methods = ['POST'], defaults = { 'db_set' : db_set_str })(api_w_render)
 
@@ -720,13 +724,19 @@ app.route('/api/ip/<everything:data>', defaults = { 'db_set' : db_set_str })(api
 
 app.route('/api/image/<everything:name>')(api_image_view)
 
+## v2 API
+app.route('/api/v2/recent_edit_request/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str, 'limit' : 50 })(api_list_recent_edit_request)
+app.route('/api/v2/recent_change/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str, 'legacy' : '', 'limit' : 50 })(api_list_recent_change)
+app.route('/api/v2/recent_discuss/<set_type>/<int:num>', defaults = { 'db_set' : db_set_str, 'legacy' : '', 'limit' : 50 })(api_list_recent_discuss)
+app.route('/api/v2/list/document/old/<int:num>', defaults = { 'db_set' : db_set_str, 'set_type' : 'old' })(api_list_old_page)
+app.route('/api/v2/list/document/new/<int:num>', defaults = { 'db_set' : db_set_str, 'set_type' : 'new' })(api_list_old_page)
+
 # Func-main
 # 여기도 전반적인 조정 시행 예정
 app.route('/other')(main_tool_other)
 app.route('/manager', methods = ['POST', 'GET'])(main_tool_admin)
 app.route('/manager/<int:num>', methods = ['POST', 'GET'])(main_tool_redirect)
 app.route('/manager/<int:num>/<everything:add_2>', methods = ['POST', 'GET'])(main_tool_redirect)
-# app.route('/guide/<doc_name>')(main_tool_guide)
 
 app.route('/search', methods=['POST'])(main_search)
 app.route('/search/<everything:name>', defaults = { 'db_set' : db_set_str }, methods = ['POST', 'GET'])(main_search_deep)

+ 33 - 28
emergency_tool.py

@@ -50,50 +50,45 @@ print('21. Change TLS')
 print('22. Delete body top')
 print('23. Delete body bottom')
 print('24. SQLite to MySQL')
+print('25. Recalc exist data_set')
 
 what_i_do = input('Insert selection number (EX : 9) : ')
 if what_i_do == '1':
-    go_num = input('All delete (Y) [Y, N] : ')
-    if not go_num == 'N':
-        curs.execute(db_change("delete from back"))
-        conn.commit()
-
     try:
         go_num = int(input('Count (100) : '))
     except ValueError:
         go_num = 100
 
-    num = 0
+    curs.execute(db_change('select count(*) from data'))
+    count = curs.fetchall()
+    count = count[0][0] if count else 0
 
+    num = 0
+    title = []
     print('Load...')
 
-    curs.execute(
-        db_change(
-            "select title from data d "
-            "where not exists ("
-            "select title from back where link = d.title limit 1"
-            ")"
-            ""
-        )
-    )
-    title = curs.fetchall()
+    while num == 0 or len(title) == 100:
+        curs.execute(db_change('select title from data limit ?, 100'), [num])
+        title = curs.fetchall()
 
-    print('Rest : ' + str(len(title)))
-    print('Start : ' + title[0][0])
-    time.sleep(1)
+        print('Rest : ' + str(count - num))
+        print('Start : ' + title[0][0])
+        time.sleep(1)
 
-    for name in title:
-        num += 1
-        if num % go_num == 0:
-            print(str(num) + ' : ' + name[0])
+        for name in title:
+            num += 1
+            if num % go_num == 0:
+                print(str(num) + ' : ' + name[0])
 
-        if num % 100 == 0:
-            conn.commit()
+            curs.execute(db_change("select data from data where title = ?"), [name[0]])
+            data = curs.fetchall()
 
-        curs.execute(db_change("select data from data where title = ?"), [name[0]])
-        data = curs.fetchall()
+            render_lang_data = {
+                'toc' : 'toc',
+                'category' : 'category'
+            }
 
-        class_do_render(conn).do_render(name[0], data[0][0], 'backlink', '')
+            class_do_render(conn, render_lang_data, '').do_render(name[0], data[0][0], 'backlink')
 elif what_i_do == '2':
     curs.execute(db_change("delete from other where name = 'recaptcha'"))
     curs.execute(db_change("delete from other where name = 'sec_re'"))
@@ -241,6 +236,16 @@ elif what_i_do == '24':
         db_data = sqlite_curs.fetchall()
         if db_data:
             mysql_curs.executemany("insert into " + create_table + " (" + create + ") values (" + create_r + ")", db_data)
+elif what_i_do == '25':
+    curs.execute(db_change("select distinct doc_name from data_set where doc_rev = 'not_exist' or doc_rev = ''"))
+    for for_a in curs.fetchall():
+        data_set_exist = ''
+        
+        curs.execute(db_change("select title from data where title = ?"), [for_a[0]])
+        if not curs.fetchall():
+            data_set_exist = 'not_exist'
+
+        curs.execute(db_change("update data_set set doc_rev = ? where doc_name = ? and (doc_rev = '' or doc_rev = 'not_exist')"), [data_set_exist, for_a[0]])
 else:
     raise ValueError(what_i_do)
 

+ 0 - 1
lang/en-US.json

@@ -471,7 +471,6 @@
                 "stiemap_exclude_file_page" : "Exclude file page(s)",
                 "stiemap_exclude_category_page" : "Exclude category page(s)",
         "_comment_2.3_" : "List",
-            "open_discussion_list" : "Open discussion(s) list",
             "discussion_list" : "Discussion(s) list",
             "admin_list" : "Administrator(s) list",
             "member_list" : "Member(s) list",

+ 0 - 1
lang/ko-KR.json

@@ -262,7 +262,6 @@
     "id_filter_list": "ID 필터 목록",
     "other": "기타",
     "edit": "편집",
-    "open_discussion_list": "열린 토론 목록",
     "user_head_warning": "비로그인시 브라우저를 닫거나 로그인시 사용자가 지정한 정보는 삭제됩니다.",
     "email_required": "이메일 사용",
     "1_day": "1일",

+ 2 - 2
route/__init__.py

@@ -46,7 +46,6 @@ from route.list_admin_auth_use import list_admin_auth_use
 from route.list_admin_group import list_admin_group_2
 from route.list_image_file import list_image_file
 from route.list_long_page import list_long_page
-from route.list_old_page import list_old_page
 from route.list_no_link import list_no_link
 from route.list_please import list_please
 from route.list_title_index import list_title_index
@@ -104,7 +103,6 @@ from route.recent_app_submit import recent_app_submit_2
 from route.recent_block import recent_block
 from route.recent_change import recent_change
 from route.recent_edit_request import recent_edit_request
-from route.recent_discuss import recent_discuss
 from route.recent_history_add import recent_history_add
 from route.recent_history_delete import recent_history_delete
 from route.recent_history_hidden import recent_history_hidden
@@ -167,6 +165,7 @@ from route.vote_select import vote_select
 
 from route.n_list_recent_change import list_recent_change
 from route.n_list_recent_discuss import list_recent_discuss
+from route.n_list_old_page import list_old_page
 
 from route.n_w_watch_list import w_watch_list
 
@@ -183,6 +182,7 @@ from route.go_api_search import api_search
 from route.go_api_list_recent_change import api_list_recent_change
 from route.go_api_list_recent_discuss import api_list_recent_discuss
 from route.go_api_list_recent_edit_request import api_list_recent_edit_request
+from route.go_api_list_old_page import api_list_old_page
 
 from route.go_api_bbs import api_bbs
 from route.go_api_bbs_list import api_bbs_list

+ 22 - 0
route/go_api_list_old_page.py

@@ -0,0 +1,22 @@
+from .tool.func import *
+
+def api_list_old_page(db_set, num = 1, set_type = 'old'):
+    other_set = {}
+    other_set["num"] = str(num)
+    other_set["set_type"] = set_type
+    other_set = json.dumps(other_set)
+
+    if platform.system() == 'Linux':
+        if platform.machine() in ["AMD64", "x86_64"]:
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+        else:
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.bin"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+    else:
+        if platform.machine() in ["AMD64", "x86_64"]:
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.amd64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+        else:
+            data = subprocess.Popen([os.path.join(".", "route_go", "bin", "main.arm64.exe"), sys._getframe().f_code.co_name, db_set, other_set], stdout = subprocess.PIPE).communicate()[0]
+
+    data = data.decode('utf8')
+
+    return flask.Response(response = data, status = 200, mimetype = 'application/json')

+ 2 - 1
route/go_api_list_recent_change.py

@@ -1,10 +1,11 @@
 from .tool.func import *
 
-def api_list_recent_change(db_set, num = 1, set_type = 'normal', limit = 10):
+def api_list_recent_change(db_set, num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
     other_set = {}
     other_set["num"] = str(num)
     other_set["limit"] = str(limit)
     other_set["set_type"] = set_type
+    other_set["legacy"] = legacy
     other_set["ip"] = ip_check()
     other_set = json.dumps(other_set)
 

+ 3 - 1
route/go_api_list_recent_discuss.py

@@ -1,9 +1,11 @@
 from .tool.func import *
 
-def api_list_recent_discuss(db_set, set_type = 'normal', limit = 10):
+def api_list_recent_discuss(db_set, num = 1, set_type = 'normal', limit = 10, legacy = 'on'):
     other_set = {}
+    other_set["num"] = str(num)
     other_set["limit"] = str(limit)
     other_set["set_type"] = set_type
+    other_set["legacy"] = legacy
     other_set["ip"] = ip_check()
     other_set = json.dumps(other_set)
 

+ 9 - 9
route/go_api_w_render.py

@@ -59,19 +59,19 @@ def api_w_render(db_set, name = '', tool = ''):
             else:
                 data_type = 'api_thread'
 
-            if markup in ('', 'namumark', 'namumark_beta'):
-                if data_option != '':
-                    data_option = json.loads(data_option)
+            if markup in ('', 'namumark', 'namumark_beta') and data_option != '':
+                data_option = json.loads(data_option)
 
-                    data_option_func = api_w_render_include(data_option)
+                data_option_func = api_w_render_include(data_option)
 
-                    # parameter replace
-                    data_org = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z0-9]+)=((?:\\@|[^@\n])+)@', data_option_func, data_org)
-                    data_org = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z0-9]+)@', data_option_func, data_org)
+                # parameter replace
+                data_org = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z0-9]+)=((?:\\@|[^@\n])+)@', data_option_func, data_org)
+                data_org = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z0-9]+)@', data_option_func, data_org)
 
-                    # remove end br
-                    data_org = re.sub('^\n+', '', data_org)
+                # remove end br
+                data_org = re.sub('^\n+', '', data_org)
 
+            if markup in ('', 'namumark'):
                 data_pas = render_set(conn, 
                     doc_name = name, 
                     doc_data = data_org, 

+ 0 - 30
route/list_old_page.py

@@ -1,30 +0,0 @@
-from .tool.func import *
-
-def list_old_page(num = 1):
-    with get_db_connect() as conn:
-        curs = conn.cursor()
-        
-        sql_num = (num * 50 - 50) if num * 50 > 0 else 0
-        
-        div = '<ul class="opennamu_ul">'
-        
-        curs.execute(db_change("select doc_name, set_data from data_set where set_name = 'last_edit' and doc_rev = '' order by set_data asc limit ?, 50"), [sql_num])
-        n_list = curs.fetchall()
-        for data in n_list:
-            div += '<li>'
-            div += data[1] + ' | <a href="/w/' + url_pas(data[0]) + '">' + html.escape(data[0]) + '</a>'
-            
-            curs.execute(db_change("select set_data from data_set where doc_name = ? and set_name = 'doc_type'"), [data[0]])
-            db_data = curs.fetchall()
-            if db_data and db_data[0][0] != '':
-                div += ' | ' + db_data[0][0]
-
-            div += '</li>'
-        
-        div += '</ul>' + next_fix(conn, '/list/document/old/', num, n_list)
-        
-        return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'old_page'), wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
-            data = div,
-            menu = [['other', get_lang(conn, 'return')]]
-        ))

+ 1 - 0
route/main_tool_other.py

@@ -28,6 +28,7 @@ def main_tool_other():
                     <li><a href="/list/document/long">''' + get_lang(conn, 'long_page') + '''</a></li>
                     <li><a href="/list/document/short">''' + get_lang(conn, 'short_page') + '''</a></li>
                     <li><a href="/list/document/old">''' + get_lang(conn, 'old_page') + '''</a></li>
+                    <li><a href="/list/document/new">''' + get_lang(conn, 'new_page') + '''</a></li>
                     <li><a href="/list/document/no_link">''' + get_lang(conn, 'no_link_document_list') + '''</a></li>
                 </ul>
                 <h3>''' + get_lang(conn, 'user') + '''</h3>

+ 19 - 0
route/n_list_old_page.py

@@ -0,0 +1,19 @@
+from .tool.func import *
+
+def list_old_page(num = 1, set_type = 'old'):
+    with get_db_connect() as conn:
+        title = ''
+        if set_type == 'old':
+            title = get_lang(conn, 'old_page')
+        else:
+            title = get_lang(conn, 'new_page')
+
+        return easy_minify(conn, flask.render_template(skin_check(conn),
+            imp = [title, wiki_set(conn), wiki_custom(conn), wiki_css([0, 0])],
+            data = '' + \
+                '<div id="opennamu_list_old_page"></div>' + \
+                '<script src="/views/main_css/js/route/list_old_page.js' + cache_v() + '"></script>' + \
+                '<script>opennamu_list_old_page();</script>' + \
+            '',
+            menu = [['other', get_lang(conn, 'return')]]
+        ))

+ 1 - 4
route/n_list_recent_change.py

@@ -2,15 +2,12 @@ from .tool.func import *
 
 def list_recent_change(num = 1, set_type = 'normal'):
     with get_db_connect() as conn:
-        if not set_type in ('normal', 'edit', 'move', 'delete', 'revert', 'r1', 'edit_request', 'user'):
-            set_type = 'normal'
-
         return easy_minify(conn, flask.render_template(skin_check(conn),
             imp = [get_lang(conn, 'recent_change'), wiki_set(conn), wiki_custom(conn), wiki_css(['(' + get_lang(conn, set_type) + ')', 0])],
             data = '' + \
                 '<div id="opennamu_list_recent_change"></div>' + \
                 '<script src="/views/main_css/js/route/list_recent_change.js' + cache_v() + '"></script>' + \
-                '<script>opennamu_list_recent_change(' + str(num) + ', "' + set_type + '");</script>' + \
+                '<script>opennamu_list_recent_change();</script>' + \
             '',
             menu = [['other', get_lang(conn, 'return')], ['recent_edit_request', get_lang(conn, 'edit_request')]]
         ))

+ 6 - 9
route/n_list_recent_discuss.py

@@ -1,22 +1,19 @@
 from .tool.func import *
 
-def list_recent_discuss(tool = 'normal'):
+def list_recent_discuss(num = 1, tool = 'normal'):
     with get_db_connect() as conn:
         m_sub = 0
-        if tool == 'normal':
-            pass
-        elif tool == 'close':
-            m_sub = '(' + get_lang(conn, 'closed') + ')'
-        else:
-            tool = 'open'
-            m_sub = '(' + get_lang(conn, 'open_discussion_list') + ')'
+        if tool == 'close':
+            m_sub = '(' + get_lang(conn, 'close_discussion') + ')'
+        elif tool == 'open':
+            m_sub = '(' + get_lang(conn, 'open_discussion') + ')'
 
         return easy_minify(conn, flask.render_template(skin_check(conn),
             imp = [get_lang(conn, 'recent_discussion'), wiki_set(conn), wiki_custom(conn), wiki_css([m_sub, 0])],
             data = '' + \
                 '<div id="opennamu_list_recent_discuss"></div>' + \
                 '<script src="/views/main_css/js/route/list_recent_discuss.js' + cache_v() + '"></script>' + \
-                '<script>opennamu_list_recent_discuss("' + tool + '");</script>' + \
+                '<script>opennamu_list_recent_discuss();</script>' + \
             '',
             menu = [['other', get_lang(conn, 'return')]]
         ))

+ 3 - 1
route/recent_change.py

@@ -38,7 +38,9 @@ def recent_change(name = '', tool = '', num = 1, set_type = 'normal'):
             ['delete', get_lang(conn, 'delete')],
             ['revert', get_lang(conn, 'revert')],
             ['r1', get_lang(conn, 'new_doc')],
-            ['edit_request', get_lang(conn, 'edit_request')]
+            ['edit_request', get_lang(conn, 'edit_request')],
+            ['file', get_lang(conn, 'file')],
+            ['category', get_lang(conn, 'category')]
         ]
         if tool == 'history':
             option_list += [['setting', get_lang(conn, 'setting')]]

+ 0 - 80
route/recent_discuss.py

@@ -1,80 +0,0 @@
-from .tool.func import *
-
-def recent_discuss(tool):
-    with get_db_connect() as conn:
-        curs = conn.cursor()
-
-        div = ''
-        admin_auth = admin_check(conn, 3)
-
-        if tool == 'normal':
-            div += '<a href="/recent_discuss/close">(' + get_lang(conn, 'close_discussion') + ')</a> '
-            div += '<a href="/recent_discuss/open">(' + get_lang(conn, 'open_discussion_list') + ')</a>'
-
-            m_sub = 0
-        elif tool == 'close':
-            div += '<a href="/recent_discuss">(' + get_lang(conn, 'normal') + ')</a>'
-
-            m_sub = ' (' + get_lang(conn, 'closed') + ')'
-        else:
-            div += '<a href="/recent_discuss">(' + get_lang(conn, 'normal') + ')</a>'
-
-            m_sub = ' (' + get_lang(conn, 'open_discussion_list') + ')'
-
-        div +=  '''
-                <hr class="main_hr">
-                <table id="main_table_set">
-                    <tbody>
-                        <tr id="main_table_top_tr">
-                            <td id="main_table_width">''' + get_lang(conn, 'discussion_name') + '''</td>
-                            <td id="main_table_width">''' + get_lang(conn, 'editor') + '''</td>
-                            <td id="main_table_width">''' + get_lang(conn, 'time') + '''</td>
-                        </tr>
-                '''
-
-        if tool == 'normal':
-            curs.execute(db_change("select title, sub, date, code from rd where not stop = 'O' order by date desc limit 50"))
-        elif tool == 'close':
-            curs.execute(db_change("select title, sub, date, code from rd where stop = 'O' order by date desc limit 50"))
-        else:
-            curs.execute(db_change('select title, sub, date, code from rd where stop != "O" order by date asc limit 50'))
-
-        db_data = curs.fetchall()
-
-        last_editor = []
-        for for_a in db_data:
-            curs.execute(db_change("select ip from topic where code = ? order by id + 0 desc limit 1"), [for_a[3]])
-            db_data_2 = curs.fetchall()
-            if db_data_2:
-                last_editor += [db_data_2[0][0]]
-            else:
-                last_editor += ['']
-
-        last_editor_ip_pas = ip_pas(conn, last_editor)
-
-        count = 0
-        for data in db_data:
-            div += '' + \
-                '<tr>' + \
-                    '<td>' + \
-                        '<a href="/thread/' + data[3] + '">' + html.escape(data[1]) + '</a> ' + \
-                        '<a href="/topic/' + url_pas(data[0]) + '">(' + html.escape(data[0]) + ')</a>' + \
-                        (' <a href="/thread/' + data[3] + '/tool">(' + get_lang(conn, 'tool') + ')</a>' if admin_auth == 1 else '') + \
-                    '</td>' + \
-                    '<td>' + last_editor_ip_pas[last_editor[count]] + '</td>' + \
-                    '<td>' + data[2] + '</td>' + \
-                '</tr>' + \
-            ''
-
-            count += 1
-
-        div += '' + \
-                '</tbody>' + \
-            '</table>' + \
-        ''
-
-        return easy_minify(conn, flask.render_template(skin_check(conn),
-            imp = [get_lang(conn, 'recent_discussion'), wiki_set(conn), wiki_custom(conn), wiki_css([m_sub, 0])],
-            data = div,
-            menu = [['other', get_lang(conn, 'return')]]
-        ))

+ 55 - 9
route/tool/func.py

@@ -128,7 +128,7 @@ def get_init_set_list(need = 'all'):
             'display' : 'Markup',
             'require' : 'select',
             'default' : 'namumark',
-            'list' : ['namumark', 'markdown', 'custom', 'raw']
+            'list' : ['namumark', 'namumark_beta', 'markdown', 'custom', 'raw']
         }, 'encode' : {
             'display' : 'Encryption method',
             'require' : 'select',
@@ -294,12 +294,14 @@ class class_check_json:
     def __init__(self):
         self.data_db_set = {}
             
-    def __new__(self):
-        self.data_db_set = self.do_check_set_json(self)
-        if self.data_db_set['type'] == 'mysql':
-            self.data_db_set = self.do_check_mysql_json(self, self.data_db_set)
+    def __new__(cls):
+        instance = super().__new__(cls)
+
+        cls.data_db_set = instance.do_check_set_json()
+        if cls.data_db_set['type'] == 'mysql':
+            cls.data_db_set = instance.do_check_mysql_json(cls.data_db_set)
         
-        return self.data_db_set
+        return cls.data_db_set
 
 def get_db_table_list():
     # DB table
@@ -608,6 +610,31 @@ def update(conn, ver_num, set_data):
     if ver_num < 3500377 and set_data['type'] == 'sqlite':
         conn.execute('pragma journal_mode = delete')
 
+    if ver_num < 3500378:
+        curs.execute(db_change("select title from data where title like 'category:%' or title like 'user:%' or title like 'file:%'"))
+        for for_a in curs.fetchall():
+            mode = ''
+            if re.search('^user:', for_a[0]):
+                mode = 'user'
+            elif re.search('^file:', for_a[0]):
+                mode = 'file'
+            elif re.search('^category:', for_a[0]):
+                mode = 'category'
+            
+            curs.execute(db_change('delete from data_set where doc_name = ? and set_name = "doc_type"'), [for_a[0]])
+            curs.execute(db_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'doc_type', ?)"), [for_a[0], mode])
+
+    if ver_num < 3500379:
+        curs.execute(db_change("select distinct doc_name from data_set where doc_rev = 'not_exist' or doc_rev = ''"))
+        for for_a in curs.fetchall():
+            data_set_exist = ''
+            
+            curs.execute(db_change("select title from data where title = ?"), [for_a[0]])
+            if not curs.fetchall():
+                data_set_exist = 'not_exist'
+
+            curs.execute(db_change("update data_set set doc_rev = ? where doc_name = ? and (doc_rev = '' or doc_rev = 'not_exist')"), [data_set_exist, for_a[0]])
+
     print('Update completed')
 
 def set_init_always(conn, ver_num):
@@ -1042,7 +1069,7 @@ def skin_check(conn, set_n = 0):
         return skin
     
 def cache_v():
-    return '.cache_v233'
+    return '.cache_v237'
 
 def wiki_css(data):
     global global_wiki_set
@@ -1399,6 +1426,18 @@ def render_set(conn, doc_name = '', doc_data = '', data_type = 'view', markup =
                     list-style: none !important;
                     font-weight: bold !important;
                 }
+
+                .opennamu_render_complete .opennamu_folding {
+                    margin-bottom: 5px;
+                }
+
+                .opennamu_render_complete .opennamu_footnote {
+                    padding-bottom: 30px;
+                }
+
+                .opennamu_render_complete iframe {
+                    display: block;
+                }
             </style>''' + \
         '' + get_class_render[0]
 
@@ -2500,7 +2539,12 @@ def history_plus(conn, title, data, date, ip, send, leng, t_check = '', mode = '
         id_data = str(int(id_data[0][0]) + 1) if id_data else '1'
         
         mode = 'r1' if id_data == '1' else mode
-        mode = mode if not re.search('^user:', title) else 'user'
+        if re.search('^user:', title):
+            mode = 'user'
+        elif re.search('^file:', title):
+            mode = 'file'
+        elif re.search('^category:', title):
+            mode = 'category'
 
     send = re.sub(r'<|>', '', send)
     send = send[:512] if len(send) > 512 else send
@@ -2523,7 +2567,9 @@ def history_plus(conn, title, data, date, ip, send, leng, t_check = '', mode = '
 
         curs.execute(db_change("insert into rc (id, title, date, type) values (?, ?, ?, ?)"), [id_data, title, date, mode])
 
-        data_set_exist = '' if mode != 'delete' else 'not_exist'
+        data_set_exist = ''
+        if mode == 'delete':
+            data_set_exist = 'not_exist'
 
         curs.execute(db_change('delete from data_set where doc_name = ? and set_name = "edit_request_doing"'), [title])
 

+ 11 - 1
route/tool/func_render.py

@@ -70,6 +70,14 @@ class class_do_render:
             data_end[0] = re.sub(r'&lt;topic_call&gt;@(?P<in>(?:(?!&lt;\/topic_call&gt;).)+)&lt;\/topic_call&gt;', '<a href="/w/user:\\g<in>">@\\g<in></a>', data_end[0])
 
         if data_type == 'backlink':
+            mode = ''
+            if re.search('^user:', doc_name):
+                mode = 'user'
+            elif re.search('^file:', doc_name):
+                mode = 'file'
+            elif re.search('^category:', doc_name):
+                mode = 'category'
+
             curs.execute(db_change("delete from back where link = ?"), [doc_name])
             curs.execute(db_change("delete from back where title = ? and type = 'no'"), [doc_name])
 
@@ -87,7 +95,9 @@ class class_do_render:
 
             curs.execute(db_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'link_count', ?)"), [doc_name, link_count])
 
-            if 'redirect' in data_end[2] and data_end[2]['redirect'] == 1:
+            if mode != '':
+                curs.execute(db_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'doc_type', ?)"), [doc_name, mode]) 
+            elif 'redirect' in data_end[2] and data_end[2]['redirect'] == 1:
                 curs.execute(db_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'doc_type', 'redirect')"), [doc_name])
             else:
                 curs.execute(db_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'doc_type', '')"), [doc_name])

+ 1 - 2
route/tool/func_render_namumark.py

@@ -1483,8 +1483,7 @@ class class_do_render_namumark:
                             '',
                             footnote_data_org
                         )
-                        self.render_data_js += 'document.getElementById("' + rfn + '_over").addEventListener("mouseenter", function() { opennamu_do_footnote_popover("' + rfn + '", "' + fn + '"); });\n'
-                        self.render_data_js += 'document.getElementById("' + rfn + '_over").addEventListener("mouseleave", function() { opennamu_do_footnote_popover("' + rfn + '", "' + fn + '"); });\n'
+                        self.render_data_js += 'document.getElementById("' + rfn + '_over").addEventListener("click", function() { opennamu_do_footnote_popover("' + rfn + '", "' + fn + '"); });\n'
                     else:
                         data_name = self.get_tool_data_storage('<sup><a fn_target="' + fn + '" id="' + rfn + '" href="#' + fn + '">(' + foot_v_name + ')</a></sup>', '', footnote_data_org)
 

TEMPAT SAMPAH
route_go/bin/main.amd64.bin


TEMPAT SAMPAH
route_go/bin/main.amd64.exe


TEMPAT SAMPAH
route_go/bin/main.arm64.bin


TEMPAT SAMPAH
route_go/bin/main.arm64.exe


+ 1 - 0
route_go/go.mod

@@ -19,6 +19,7 @@ require (
 	cloud.google.com/go/compute/metadata v0.2.3 // indirect
 	cloud.google.com/go/longrunning v0.5.2 // indirect
 	filippo.io/edwards25519 v1.1.0 // indirect
+	github.com/dlclark/regexp2 v1.11.0 // indirect
 	github.com/dustin/go-humanize v1.0.1 // indirect
 	github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
 	github.com/golang/protobuf v1.5.3 // indirect

+ 2 - 0
route_go/go.sum

@@ -17,6 +17,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
 github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
+github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
 github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
 github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
 github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=

+ 25 - 19
route_go/main.go

@@ -1,6 +1,7 @@
 package main
 
 import (
+	"fmt"
 	"log"
 	"opennamu/route"
 	"os"
@@ -11,45 +12,50 @@ func main() {
 
 	log.SetFlags(log.LstdFlags | log.Lshortfile)
 
+	var route_data string
 	if call_arg[0] == "main_func_easter_egg" {
-		route.Main_func_easter_egg()
+		route_data = route.Main_func_easter_egg()
 	} else if call_arg[0] == "api_w_raw" {
-		route.Api_w_raw(call_arg[1:])
+		route_data = route.Api_w_raw(call_arg[1:])
 	} else if call_arg[0] == "api_func_sha224" {
-		route.Api_func_sha224(call_arg[1:])
+		route_data = route.Api_func_sha224(call_arg[1:])
 	} else if call_arg[0] == "api_w_random" {
-		route.Api_w_random(call_arg[1:])
+		route_data = route.Api_w_random(call_arg[1:])
 	} else if call_arg[0] == "api_search" {
-		route.Api_search(call_arg[1:])
+		route_data = route.Api_search(call_arg[1:])
 	} else if call_arg[0] == "api_topic" {
-		route.Api_thread(call_arg[1:])
+		route_data = route.Api_thread(call_arg[1:])
 	} else if call_arg[0] == "api_func_ip" {
-		route.Api_func_ip(call_arg[1:])
+		route_data = route.Api_func_ip(call_arg[1:])
 	} else if call_arg[0] == "api_list_recent_change" {
-		route.Api_list_recent_change(call_arg[1:])
+		route_data = route.Api_list_recent_change(call_arg[1:])
 	} else if call_arg[0] == "api_list_recent_edit_request" {
-		route.Api_list_recent_edit_request(call_arg[1:])
+		route_data = route.Api_list_recent_edit_request(call_arg[1:])
 	} else if call_arg[0] == "api_bbs" {
-		route.Api_bbs(call_arg[1:])
+		route_data = route.Api_bbs(call_arg[1:])
 	} else if call_arg[0] == "api_w_xref" {
-		route.Api_w_xref(call_arg[1:])
+		route_data = route.Api_w_xref(call_arg[1:])
 	} else if call_arg[0] == "api_w_watch_list" {
-		route.Api_w_watch_list(call_arg[1:])
+		route_data = route.Api_w_watch_list(call_arg[1:])
 	} else if call_arg[0] == "api_user_watch_list" {
-		route.Api_user_watch_list(call_arg[1:])
+		route_data = route.Api_user_watch_list(call_arg[1:])
 	} else if call_arg[0] == "api_w_render" {
-		route.Api_w_render(call_arg[1:])
+		route_data = route.Api_w_render(call_arg[1:])
 	} else if call_arg[0] == "api_func_llm" {
-		route.Api_func_llm(call_arg[1:])
+		route_data = route.Api_func_llm(call_arg[1:])
 	} else if call_arg[0] == "api_func_language" {
-		route.Api_func_language(call_arg[1:])
+		route_data = route.Api_func_language(call_arg[1:])
 	} else if call_arg[0] == "api_func_auth_list" {
-		route.Api_func_auth_list(call_arg[1:])
+		route_data = route.Api_func_auth_list(call_arg[1:])
 	} else if call_arg[0] == "api_list_recent_discuss" {
-		route.Api_list_recent_discuss(call_arg[1:])
+		route_data = route.Api_list_recent_discuss(call_arg[1:])
 	} else if call_arg[0] == "api_bbs_list" {
-		route.Api_bbs_list(call_arg[1:])
+		route_data = route.Api_bbs_list(call_arg[1:])
+	} else if call_arg[0] == "api_list_old_page" {
+		route_data = route.Api_list_old_page(call_arg[1:])
 	} else {
 		log.Fatal("404")
 	}
+
+	fmt.Print(route_data)
 }

+ 3 - 7
route_go/route/api_bbs.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 	"strconv"
 )
 
-func Api_bbs(call_arg []string) {
+func Api_bbs(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -17,9 +16,6 @@ func Api_bbs(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	var rows *sql.Rows
@@ -115,9 +111,9 @@ func Api_bbs(call_arg []string) {
 	}
 
 	if len(data_list) == 0 {
-		fmt.Print("{}")
+		return "{}"
 	} else {
 		json_data, _ := json.Marshal(data_list)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	}
 }

+ 3 - 7
route_go/route/api_bbs_list.go

@@ -3,7 +3,6 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 )
@@ -32,14 +31,11 @@ func bbs_list(db *sql.DB, db_set map[string]string) map[string]string {
 	return data_list
 }
 
-func Api_bbs_list(call_arg []string) {
+func Api_bbs_list(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	data_list := bbs_list(db, db_set)
@@ -84,9 +80,9 @@ func Api_bbs_list(call_arg []string) {
 	}
 
 	if len(data_list_sub) == 0 {
-		fmt.Print("{}")
+		return "{}"
 	} else {
 		json_data, _ := json.Marshal(data_list_sub)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	}
 }

+ 2 - 6
route_go/route/api_func_auth_list.go

@@ -2,11 +2,10 @@ package route
 
 import (
 	"encoding/json"
-	"fmt"
 	"opennamu/route/tool"
 )
 
-func Api_func_auth_list(call_arg []string) {
+func Api_func_auth_list(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -14,14 +13,11 @@ func Api_func_auth_list(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
 	auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
 
 	json_data, _ := json.Marshal(auth_info)
-	fmt.Print(string(json_data))
+	return string(json_data)
 }

+ 2 - 6
route_go/route/api_func_ip.go

@@ -2,12 +2,11 @@ package route
 
 import (
 	"encoding/json"
-	"fmt"
 
 	"opennamu/route/tool"
 )
 
-func Api_func_ip(call_arg []string) {
+func Api_func_ip(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -15,9 +14,6 @@ func Api_func_ip(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	ip_data := tool.IP_parser(db, db_set, other_set["data"], other_set["ip"])
@@ -26,5 +22,5 @@ func Api_func_ip(call_arg []string) {
 	new_data["data"] = ip_data
 
 	json_data, _ := json.Marshal(new_data)
-	fmt.Print(string(json_data))
+	return string(json_data)
 }

+ 2 - 6
route_go/route/api_func_language.go

@@ -2,11 +2,10 @@ package route
 
 import (
 	"encoding/json"
-	"fmt"
 	"opennamu/route/tool"
 )
 
-func Api_func_language(call_arg []string) {
+func Api_func_language(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -14,9 +13,6 @@ func Api_func_language(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	data_list := map[string][]string{}
@@ -29,5 +25,5 @@ func Api_func_language(call_arg []string) {
 	}
 
 	json_data, _ := json.Marshal(data_list)
-	fmt.Print(string(json_data))
+	return string(json_data)
 }

+ 2 - 6
route_go/route/api_func_llm.go

@@ -4,7 +4,6 @@ import (
 	"context"
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 
@@ -12,7 +11,7 @@ import (
 	"google.golang.org/api/option"
 )
 
-func Api_func_llm(call_arg []string) {
+func Api_func_llm(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -20,9 +19,6 @@ func Api_func_llm(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	var api_key string
@@ -59,5 +55,5 @@ func Api_func_llm(call_arg []string) {
 	text := resp.Candidates[0].Content.Parts[0]
 
 	json_data, _ := json.Marshal(map[string]genai.Part{"data": text})
-	fmt.Print(string(json_data))
+	return string(json_data)
 }

+ 2 - 3
route_go/route/api_func_sha224.go

@@ -2,12 +2,11 @@ package route
 
 import (
 	"encoding/json"
-	"fmt"
 
 	"opennamu/route/tool"
 )
 
-func Api_func_sha224(call_arg []string) {
+func Api_func_sha224(call_arg []string) string {
 	data := call_arg[0]
 
 	hash_str := tool.Sha224(data)
@@ -16,5 +15,5 @@ func Api_func_sha224(call_arg []string) {
 	new_data["data"] = hash_str
 
 	json_data, _ := json.Marshal(new_data)
-	fmt.Print(string(json_data))
+	return string(json_data)
 }

+ 81 - 0
route_go/route/api_list_old_page.go

@@ -0,0 +1,81 @@
+package route
+
+import (
+	"database/sql"
+	"encoding/json"
+	"log"
+	"opennamu/route/tool"
+	"strconv"
+)
+
+func Api_list_old_page(call_arg []string) string {
+	db_set := map[string]string{}
+	json.Unmarshal([]byte(call_arg[0]), &db_set)
+
+	other_set := map[string]string{}
+	json.Unmarshal([]byte(call_arg[1]), &other_set)
+
+	db := tool.DB_connect(db_set)
+	defer db.Close()
+
+	page_int, err := strconv.Atoi(other_set["num"])
+	if err != nil {
+		log.Fatal(err)
+	}
+
+	if page_int > 0 {
+		page_int = (page_int * 50) - 50
+	} else {
+		page_int = 0
+	}
+
+	var stmt *sql.Stmt
+
+	if other_set["set_type"] == "old" {
+		stmt, err = db.Prepare(tool.DB_change(db_set, "select doc_name, set_data from data_set where set_name = 'last_edit' and doc_rev = '' and not (doc_name) in (select doc_name from data_set where set_name = 'doc_type' and set_data != '') order by set_data asc limit ?, 50"))
+	} else {
+		stmt, err = db.Prepare(tool.DB_change(db_set, "select doc_name, set_data from data_set where set_name = 'last_edit' and doc_rev = '' and not (doc_name) in (select doc_name from data_set where set_name = 'doc_type' and set_data != '') order by set_data desc limit ?, 50"))
+	}
+
+	if err != nil {
+		log.Fatal(err)
+	}
+	defer stmt.Close()
+
+	rows, err := stmt.Query(page_int)
+	if err != nil {
+		log.Fatal(err)
+	}
+	defer rows.Close()
+
+	var data_list [][]string
+
+	for rows.Next() {
+		var doc_name string
+		var date string
+
+		err := rows.Scan(&doc_name, &date)
+		if err != nil {
+			log.Fatal(err)
+		}
+
+		stmt, err = db.Prepare(tool.DB_change(db_set, "select set_data from data_set where doc_name = ? and set_name = 'doc_type'"))
+		if err != nil {
+			log.Fatal(err)
+		}
+		defer stmt.Close()
+
+		data_list = append(data_list, []string{doc_name, date})
+	}
+
+	return_data := make(map[string]interface{})
+
+	if len(data_list) == 0 {
+		return_data["data"] = map[string]string{}
+	} else {
+		return_data["data"] = data_list
+	}
+
+	json_data, _ := json.Marshal(return_data)
+	return string(json_data)
+}

+ 42 - 9
route_go/route/api_list_recent_change.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 	"strconv"
 )
 
-func Api_list_recent_change(call_arg []string) {
+func Api_list_recent_change(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -17,9 +16,6 @@ func Api_list_recent_change(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	set_type := other_set["set_type"]
@@ -130,10 +126,47 @@ func Api_list_recent_change(call_arg []string) {
 		}
 	}
 
-	if len(data_list) == 0 {
-		fmt.Print("{}")
+	if other_set["legacy"] != "" {
+		if len(data_list) == 0 {
+			return "{}"
+		} else {
+			json_data, _ := json.Marshal(data_list)
+			return string(json_data)
+		}
 	} else {
-		json_data, _ := json.Marshal(data_list)
-		fmt.Print(string(json_data))
+		auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
+		auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+
+		return_data := make(map[string]interface{})
+		return_data["language"] = map[string]string{
+			"tool":           tool.Get_language(db, db_set, "tool", false),
+			"normal":         tool.Get_language(db, db_set, "normal", false),
+			"edit":           tool.Get_language(db, db_set, "edit", false),
+			"move":           tool.Get_language(db, db_set, "move", false),
+			"delete":         tool.Get_language(db, db_set, "delete", false),
+			"revert":         tool.Get_language(db, db_set, "revert", false),
+			"new_doc":        tool.Get_language(db, db_set, "new_doc", false),
+			"edit_request":   tool.Get_language(db, db_set, "edit_request", false),
+			"user_document":  tool.Get_language(db, db_set, "user_document", false),
+			"raw":            tool.Get_language(db, db_set, "raw", false),
+			"compare":        tool.Get_language(db, db_set, "compare", false),
+			"history":        tool.Get_language(db, db_set, "history", false),
+			"hide":           tool.Get_language(db, db_set, "hide", false),
+			"history_delete": tool.Get_language(db, db_set, "history_delete", false),
+			"send_edit":      tool.Get_language(db, db_set, "send_edit", false),
+			"file":           tool.Get_language(db, db_set, "file", false),
+			"category":       tool.Get_language(db, db_set, "category", false),
+			"setting":        tool.Get_language(db, db_set, "setting", false),
+		}
+		return_data["auth"] = auth_info
+
+		if len(data_list) == 0 {
+			return_data["data"] = map[string]string{}
+		} else {
+			return_data["data"] = data_list
+		}
+
+		json_data, _ := json.Marshal(return_data)
+		return string(json_data)
 	}
 }

+ 44 - 13
route_go/route/api_list_recent_discuss.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 	"strconv"
 )
 
-func Api_list_recent_discuss(call_arg []string) {
+func Api_list_recent_discuss(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -17,9 +16,6 @@ func Api_list_recent_discuss(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	limit_int, err := strconv.Atoi(other_set["limit"])
@@ -31,15 +27,26 @@ func Api_list_recent_discuss(call_arg []string) {
 		limit_int = 50
 	}
 
+	page_int, err := strconv.Atoi(other_set["num"])
+	if err != nil {
+		log.Fatal(err)
+	}
+
+	if page_int > 0 {
+		page_int = (page_int * limit_int) - limit_int
+	} else {
+		page_int = 0
+	}
+
 	var stmt *sql.Stmt
 
 	set_type := other_set["set_type"]
 	if set_type == "normal" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop from rd order by date desc limit ?"))
+		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop from rd order by date desc limit ?, ?"))
 	} else if set_type == "close" {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop from rd where stop = 'O' order by date desc limit ?"))
+		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop from rd where stop = 'O' order by date desc limit ?, ?"))
 	} else {
-		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop from rd where stop != 'O' order by date desc limit ?"))
+		stmt, err = db.Prepare(tool.DB_change(db_set, "select title, sub, date, code, stop from rd where stop != 'O' order by date desc limit ?, ?"))
 	}
 
 	if err != nil {
@@ -47,7 +54,7 @@ func Api_list_recent_discuss(call_arg []string) {
 	}
 	defer stmt.Close()
 
-	rows, err := stmt.Query(limit_int)
+	rows, err := stmt.Query(page_int, limit_int)
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -111,10 +118,34 @@ func Api_list_recent_discuss(call_arg []string) {
 		})
 	}
 
-	if len(data_list) == 0 {
-		fmt.Print("{}")
+	if other_set["legacy"] != "" {
+		if len(data_list) == 0 {
+			return "{}"
+		} else {
+			json_data, _ := json.Marshal(data_list)
+			return string(json_data)
+		}
 	} else {
-		json_data, _ := json.Marshal(data_list)
-		fmt.Print(string(json_data))
+		auth_name := tool.Get_user_auth(db, db_set, other_set["ip"])
+		auth_info := tool.Get_auth_group_info(db, db_set, auth_name)
+
+		return_data := make(map[string]interface{})
+		return_data["language"] = map[string]string{
+			"tool":             tool.Get_language(db, db_set, "tool", false),
+			"normal":           tool.Get_language(db, db_set, "normal", false),
+			"close_discussion": tool.Get_language(db, db_set, "close_discussion", false),
+			"open_discussion":  tool.Get_language(db, db_set, "open_discussion", false),
+			"closed":           tool.Get_language(db, db_set, "closed", false),
+		}
+		return_data["auth"] = auth_info
+
+		if len(data_list) == 0 {
+			return_data["data"] = map[string]string{}
+		} else {
+			return_data["data"] = data_list
+		}
+
+		json_data, _ := json.Marshal(return_data)
+		return string(json_data)
 	}
 }

+ 3 - 7
route_go/route/api_list_recent_edit_request.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 	"strconv"
 )
 
-func Api_list_recent_edit_request(call_arg []string) {
+func Api_list_recent_edit_request(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -17,9 +16,6 @@ func Api_list_recent_edit_request(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	limit_int, err := strconv.Atoi(other_set["limit"])
@@ -115,9 +111,9 @@ func Api_list_recent_edit_request(call_arg []string) {
 	}
 
 	if len(data_list) == 0 {
-		fmt.Print("{}")
+		return "{}"
 	} else {
 		json_data, _ := json.Marshal(data_list)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	}
 }

+ 5 - 9
route_go/route/api_search.go

@@ -2,14 +2,13 @@ package route
 
 import (
 	"encoding/json"
-	"fmt"
 	"log"
 	"strconv"
 
 	"opennamu/route/tool"
 )
 
-func Api_search(call_arg []string) {
+func Api_search(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -23,9 +22,6 @@ func Api_search(call_arg []string) {
 	}
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	if other_set["search_type"] == "title" {
@@ -54,10 +50,10 @@ func Api_search(call_arg []string) {
 		}
 
 		if len(title_list) == 0 {
-			fmt.Print("{}")
+			return "{}"
 		} else {
 			json_data, _ := json.Marshal(title_list)
-			fmt.Print(string(json_data))
+			return string(json_data)
 		}
 	} else {
 		stmt, err := db.Prepare(tool.DB_change(db_set, "select title from data where data collate nocase like ? order by title limit ?, 50"))
@@ -85,10 +81,10 @@ func Api_search(call_arg []string) {
 		}
 
 		if len(title_list) == 0 {
-			fmt.Print("{}")
+			return "{}"
 		} else {
 			json_data, _ := json.Marshal(title_list)
-			fmt.Print(string(json_data))
+			return string(json_data)
 		}
 	}
 }

+ 3 - 7
route_go/route/api_thread.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 
 	"opennamu/route/tool"
 )
 
-func Api_thread(call_arg []string) {
+func Api_thread(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -17,9 +16,6 @@ func Api_thread(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	if other_set["tool"] == "length" {
@@ -43,7 +39,7 @@ func Api_thread(call_arg []string) {
 		new_data["length"] = length
 
 		json_data, _ := json.Marshal(new_data)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	} else {
 		var rows *sql.Rows
 
@@ -126,6 +122,6 @@ func Api_thread(call_arg []string) {
 		}
 
 		json_data, _ := json.Marshal(new_data)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	}
 }

+ 5 - 0
route_go/route/api_topic_list.go

@@ -0,0 +1,5 @@
+package route
+
+func Api_topic_list() string {
+	return ""
+}

+ 4 - 9
route_go/route/api_user_watch_list.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 	"strconv"
 )
 
-func Api_user_watch_list(call_arg []string) {
+func Api_user_watch_list(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -23,16 +22,12 @@ func Api_user_watch_list(call_arg []string) {
 	}
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	ip := other_set["ip"]
 	name := other_set["name"]
 	if ip != name && tool.Get_user_auth(db, db_set, ip) == "" {
-		fmt.Print("{}")
-		return
+		return "{}"
 	}
 
 	var stmt *sql.Stmt
@@ -67,9 +62,9 @@ func Api_user_watch_list(call_arg []string) {
 	}
 
 	if len(data_list) == 0 {
-		fmt.Print("{}")
+		return "{}"
 	} else {
 		json_data, _ := json.Marshal(data_list)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	}
 }

+ 2 - 6
route_go/route/api_w_random.go

@@ -3,20 +3,16 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 
 	"opennamu/route/tool"
 )
 
-func Api_w_random(call_arg []string) {
+func Api_w_random(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	var title string
@@ -34,5 +30,5 @@ func Api_w_random(call_arg []string) {
 	new_data["data"] = title
 
 	json_data, _ := json.Marshal(new_data)
-	fmt.Print(string(json_data))
+	return string(json_data)
 }

+ 4 - 8
route_go/route/api_w_raw.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 
 	"opennamu/route/tool"
 )
 
-func Api_w_raw(call_arg []string) {
+func Api_w_raw(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -17,9 +16,6 @@ func Api_w_raw(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	if other_set["exist_check"] != "" {
@@ -43,7 +39,7 @@ func Api_w_raw(call_arg []string) {
 		}
 
 		json_data, _ := json.Marshal(new_data)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	} else {
 		new_data := map[string]string{}
 		var data string
@@ -67,7 +63,7 @@ func Api_w_raw(call_arg []string) {
 			}
 
 			json_data, _ := json.Marshal(new_data)
-			fmt.Print(string(json_data))
+			return string(json_data)
 		} else {
 			stmt, err := db.Prepare(tool.DB_change(db_set, "select data from data where title = ?"))
 			if err != nil {
@@ -87,7 +83,7 @@ func Api_w_raw(call_arg []string) {
 			}
 
 			json_data, _ := json.Marshal(new_data)
-			fmt.Print(string(json_data))
+			return string(json_data)
 		}
 	}
 }

+ 2 - 6
route_go/route/api_w_render.go

@@ -2,11 +2,10 @@ package route
 
 import (
 	"encoding/json"
-	"fmt"
 	"opennamu/route/tool"
 )
 
-func Api_w_render(call_arg []string) {
+func Api_w_render(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -14,13 +13,10 @@ func Api_w_render(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	data := tool.Get_render(db, db_set, other_set["doc_name"], other_set["data"], other_set["render_type"])
 
 	json_data, _ := json.Marshal(data)
-	fmt.Print(string(json_data))
+	return string(json_data)
 }

+ 4 - 9
route_go/route/api_w_watch_list.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 	"strconv"
 )
 
-func Api_w_watch_list(call_arg []string) {
+func Api_w_watch_list(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -23,15 +22,11 @@ func Api_w_watch_list(call_arg []string) {
 	}
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	ip := other_set["ip"]
 	if tool.Get_user_auth(db, db_set, ip) == "" {
-		fmt.Print("{}")
-		return
+		return "{}"
 	}
 
 	var stmt *sql.Stmt
@@ -66,9 +61,9 @@ func Api_w_watch_list(call_arg []string) {
 	}
 
 	if len(data_list) == 0 {
-		fmt.Print("{}")
+		return "{}"
 	} else {
 		json_data, _ := json.Marshal(data_list)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	}
 }

+ 3 - 7
route_go/route/api_w_xref.go

@@ -3,13 +3,12 @@ package route
 import (
 	"database/sql"
 	"encoding/json"
-	"fmt"
 	"log"
 	"opennamu/route/tool"
 	"strconv"
 )
 
-func Api_w_xref(call_arg []string) {
+func Api_w_xref(call_arg []string) string {
 	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
@@ -17,9 +16,6 @@ func Api_w_xref(call_arg []string) {
 	json.Unmarshal([]byte(call_arg[1]), &other_set)
 
 	db := tool.DB_connect(db_set)
-	if db == nil {
-		return
-	}
 	defer db.Close()
 
 	page, _ := strconv.Atoi(other_set["page"])
@@ -76,9 +72,9 @@ func Api_w_xref(call_arg []string) {
 	}
 
 	if len(data_list) == 0 {
-		fmt.Print("{}")
+		return "{}"
 	} else {
 		json_data, _ := json.Marshal(data_list)
-		fmt.Print(string(json_data))
+		return string(json_data)
 	}
 }

+ 2 - 3
route_go/route/main_func_easter_egg.go

@@ -1,11 +1,10 @@
 package route
 
 import (
-	"fmt"
 	"math/rand"
 )
 
-func Main_func_easter_egg() {
+func Main_func_easter_egg() string {
 	select_list := []string{
 		"PWD0ZbR7AOY", // Shanghai Teahouse ~ Chinese Tea
 		"HoU29ljOmTE", // Flawless Clothing of Celestials
@@ -30,5 +29,5 @@ func Main_func_easter_egg() {
 	}
 	select_str := select_list[rand.Intn(len(select_list)-1)]
 
-	fmt.Print("<iframe width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/" + select_str + "\" frameborder=\"0\" allowfullscreen></iframe>")
+	return "<iframe width=\"640\" height=\"360\" src=\"https://www.youtube.com/embed/" + select_str + "\" frameborder=\"0\" allowfullscreen></iframe>"
 }

+ 223 - 5
route_go/route/tool/namumark.go

@@ -1,11 +1,229 @@
 package tool
 
-func Namumark() map[string]interface{} {
+import (
+	"database/sql"
+	"html"
+	"log"
+	"regexp"
+	"strconv"
+	"strings"
+
+	"github.com/dlclark/regexp2"
+)
+
+type namumark struct {
+	db     *sql.DB
+	db_set map[string]string
+	data   map[string]string
+
+	render_data    string
+	render_data_js string
+
+	temp_data       map[string]string
+	temp_data_raw   map[string]string
+	temp_data_count int
+
+	backlink   [][]string
+	link_count int
+}
+
+func Namumark_new(db *sql.DB, db_set map[string]string, data map[string]string) *namumark {
+	data_string := data["data"]
+	data_string = html.EscapeString(data_string)
+	data_string = strings.Replace(data_string, "\r", "", -1)
+	data_string = "\n" + data_string + "\n"
+
+	return &namumark{
+		db,
+		db_set,
+		data,
+
+		data_string,
+		"",
+
+		map[string]string{},
+		map[string]string{},
+		0,
+
+		[][]string{},
+		0,
+	}
+}
+
+func (class *namumark) func_temp_save(data string, data_raw string) string {
+	name := "<temp_save_" + strconv.Itoa(class.temp_data_count) + ">"
+
+	class.temp_data[name] = data
+	class.temp_data_raw[name] = data_raw
+	class.temp_data_count += 1
+
+	return name
+}
+
+func (class namumark) func_temp_restore(data string, to_raw bool) string {
+	string_data := data
+
+	if to_raw {
+		for k, v := range class.temp_data_raw {
+			string_data = strings.Replace(string_data, k, v, 1)
+		}
+	} else {
+		for k, v := range class.temp_data {
+			string_data = strings.Replace(string_data, k, v, 1)
+		}
+	}
+
+	return string_data
+}
+
+func (class *namumark) render_text() {
+	string_data := class.render_data
+
+	r := regexp2.MustCompile(`&#39;&#39;&#39;((?:(?!&#39;&#39;&#39;).)+)&#39;&#39;&#39;`, 0)
+	for {
+		if m, _ := r.FindStringMatch(string_data); m != nil {
+			gps := m.Groups()
+			m_string := m.String()
+
+			temp_name := class.func_temp_save("<b>"+gps[1].Captures[0].String()+"</b>", m_string)
+			string_data = strings.Replace(string_data, m_string, temp_name, 1)
+		} else {
+			break
+		}
+	}
+
+	r = regexp2.MustCompile(`&#39;&#39;((?:(?!&#39;&#39;).)+)&#39;&#39;`, 0)
+	for {
+		if m, _ := r.FindStringMatch(string_data); m != nil {
+			gps := m.Groups()
+			m_string := m.String()
+
+			temp_name := class.func_temp_save("<i>"+gps[1].Captures[0].String()+"</i>", m_string)
+			string_data = strings.Replace(string_data, m_string, temp_name, 1)
+		} else {
+			break
+		}
+	}
+
+	r = regexp2.MustCompile(`__((?:(?!__).)+)__`, 0)
+	for {
+		if m, _ := r.FindStringMatch(string_data); m != nil {
+			gps := m.Groups()
+			m_string := m.String()
+
+			temp_name := class.func_temp_save("<u>"+gps[1].Captures[0].String()+"</u>", m_string)
+			string_data = strings.Replace(string_data, m_string, temp_name, 1)
+		} else {
+			break
+		}
+	}
+
+	r_list := []string{`\^\^\^((?:(?!\^\^\^).)+)\^\^\^`, `\^\^((?:(?!\^\^).)+)\^\^`}
+	for for_a := 0; for_a < len(r_list); for_a++ {
+		r = regexp2.MustCompile(r_list[for_a], 0)
+		for {
+			if m, _ := r.FindStringMatch(string_data); m != nil {
+				gps := m.Groups()
+				m_string := m.String()
+
+				temp_name := class.func_temp_save("<sup>"+gps[1].Captures[0].String()+"</sup>", m_string)
+				string_data = strings.Replace(string_data, m_string, temp_name, 1)
+			} else {
+				break
+			}
+		}
+	}
+
+	r_list = []string{`,,,((?:(?!,,,).)+),,,`, `,,((?:(?!,,).)+),,`}
+	for for_a := 0; for_a < len(r_list); for_a++ {
+		r = regexp2.MustCompile(r_list[for_a], 0)
+		for {
+			if m, _ := r.FindStringMatch(string_data); m != nil {
+				gps := m.Groups()
+				m_string := m.String()
+
+				temp_name := class.func_temp_save("<sub>"+gps[1].Captures[0].String()+"</sub>", m_string)
+				string_data = strings.Replace(string_data, m_string, temp_name, 1)
+			} else {
+				break
+			}
+		}
+	}
+
+	r_list = []string{`--((?:(?!--).)+)--`, `~~((?:(?!~~).)+)~~`}
+	for for_a := 0; for_a < len(r_list); for_a++ {
+		r = regexp2.MustCompile(r_list[for_a], 0)
+		for {
+			if m, _ := r.FindStringMatch(string_data); m != nil {
+				gps := m.Groups()
+				m_string := m.String()
+
+				temp_name := class.func_temp_save("<s>"+gps[1].Captures[0].String()+"</s>", m_string)
+				string_data = strings.Replace(string_data, m_string, temp_name, 1)
+			} else {
+				break
+			}
+		}
+	}
+
+	class.render_data = string_data
+}
+
+func (class *namumark) render_last() {
+	string_data := class.render_data
+
+	string_data = class.func_temp_restore(string_data, false)
+
+	r := regexp.MustCompile(`(\n| )+$`)
+	string_data = r.ReplaceAllString(string_data, "")
+
+	r = regexp.MustCompile(`^(\n| )+`)
+	string_data = r.ReplaceAllString(string_data, "")
+
+	r = regexp.MustCompile(`\n?<front_br>`)
+	string_data = r.ReplaceAllString(string_data, "")
+
+	r = regexp.MustCompile(`<back_br>\n?`)
+	string_data = r.ReplaceAllString(string_data, "")
+
+	string_data = strings.Replace(string_data, "\n", "<br>", -1)
+
+	class.render_data = string_data
+	class.render_data_js += "opennamu_do_toc();"
+}
+
+func (class *namumark) render_heading() {
+	string_data := class.render_data
+
+	r := regexp.MustCompile(`\n(?:(={1,6})(#?) ?([^\n]+))\n`)
+	string_data = r.ReplaceAllStringFunc(string_data, func(m string) string {
+		match := r.FindStringSubmatch(m)
+
+		r = regexp.MustCompile(` ?(#?={1,6}[^=]*)$`)
+		heading_data := r.ReplaceAllString(match[3], "")
+
+		heading_len := strconv.Itoa(len(match[1]))
+		heading_render := "<h" + heading_len + ">" + heading_data + "</h" + heading_len + ">"
+
+		temp_name := class.func_temp_save(heading_render, match[0])
+		return temp_name
+	})
+
+	class.render_data = string_data
+}
+
+func (class namumark) main() map[string]interface{} {
+	class.render_text()
+	class.render_heading()
+	class.render_last()
+
+	log.Default().Println(class.render_data)
+
 	end_data := make(map[string]interface{})
-	end_data["data"] = ""
-	end_data["js_data"] = ""
-	end_data["backlink"] = [][]string{}
-	end_data["link_count"] = 0
+	end_data["data"] = class.render_data
+	end_data["js_data"] = class.render_data_js
+	end_data["backlink"] = class.backlink
+	end_data["link_count"] = class.link_count
 
 	return end_data
 }

+ 3 - 2
route_go/route/tool/render.go

@@ -38,7 +38,7 @@ func Get_render(db *sql.DB, db_set map[string]string, doc_name string, data stri
 		}
 	}
 
-	if markup == "" {
+	if markup == "" || markup == "namumark_beta" {
 		markup = "namumark"
 	}
 
@@ -77,7 +77,8 @@ func Get_render_direct(db *sql.DB, db_set map[string]string, doc_name string, da
 
 	render_data := make(map[string]interface{})
 	if markup == "namumark" {
-		render_data = Namumark()
+		render_data_class := Namumark_new(db, db_set, doc_data_set)
+		render_data = render_data_class.main()
 	} else if markup == "markdown" {
 		render_data = Markdown(db, db_set, doc_data_set)
 	} else {

+ 41 - 28
route_go/windows_amd64.ps1

@@ -1,33 +1,46 @@
 $file_name = Read-Host "file_name "
 
-Write-Host "linux amd64"
-$env:GOOS = "linux"
-$env:GOARCH = "amd64"
-$env:CGO_ENABLED = 0
-go build $file_name.go
-Remove-Item ".\bin\$file_name.amd64.bin"
-Move-Item "opennamu" ".\bin\$file_name.amd64.bin"
+$to = $args[0]
+if($to -eq $null) {
+    $to = "all"
+}
 
-Write-Host "linux arm64"
-$env:GOOS = "linux"
-$env:GOARCH = "arm64"
-$env:CGO_ENABLED = 0
-go build $file_name.go
-Remove-Item ".\bin\$file_name.arm64.bin"
-Move-Item "opennamu" ".\bin\$file_name.arm64.bin"
+if($to -eq "linux_amd64" -or $to -eq "all") {
+    Write-Host "linux amd64"
+    $env:GOOS = "linux"
+    $env:GOARCH = "amd64"
+    $env:CGO_ENABLED = 0
+    go build $file_name.go
+    Remove-Item ".\bin\$file_name.amd64.bin"
+    Move-Item "opennamu" ".\bin\$file_name.amd64.bin"
+}
 
-Write-Host "windows amd64"
-$env:GOOS = "windows"
-$env:GOARCH = "amd64"
-$env:CGO_ENABLED = 0
-go build $file_name.go
-Remove-Item ".\bin\$file_name.amd64.exe"
-Move-Item "opennamu.exe" ".\bin\$file_name.amd64.exe"
+if($to -eq "linux_arm64" -or $to -eq "all") {
+    Write-Host "linux arm64"
+    $env:GOOS = "linux"
+    $env:GOARCH = "arm64"
+    $env:CGO_ENABLED = 0
+    go build $file_name.go
+    Remove-Item ".\bin\$file_name.arm64.bin"
+    Move-Item "opennamu" ".\bin\$file_name.arm64.bin"
+}
 
-Write-Host "windows arm64"
-$env:GOOS = "windows"
-$env:GOARCH = "arm64"
-$env:CGO_ENABLED = 0
-go build $file_name.go
-Remove-Item ".\bin\$file_name.arm64.exe"
-Move-Item "opennamu.exe" ".\bin\$file_name.arm64.exe"
+if($to -eq "windows_amd64" -or $to -eq "all") {
+    Write-Host "windows amd64"
+    $env:GOOS = "windows"
+    $env:GOARCH = "amd64"
+    $env:CGO_ENABLED = 0
+    go build $file_name.go
+    Remove-Item ".\bin\$file_name.amd64.exe"
+    Move-Item "opennamu.exe" ".\bin\$file_name.amd64.exe"
+}
+
+if($to -eq "windows_arm64" -or $to -eq "all") {
+    Write-Host "windows arm64"
+    $env:GOOS = "windows"
+    $env:GOARCH = "arm64"
+    $env:CGO_ENABLED = 0
+    go build $file_name.go
+    Remove-Item ".\bin\$file_name.arm64.exe"
+    Move-Item "opennamu.exe" ".\bin\$file_name.arm64.exe"
+}

+ 2 - 2
version.json

@@ -1,7 +1,7 @@
 {
     "beta" : {
-        "r_ver" : "v3.5.0-dev80",
-        "c_ver" : "3500377",
+        "r_ver" : "v3.5.0-dev86",
+        "c_ver" : "3500379",
         "s_ver" : "3500113"
     }
 }

+ 22 - 1
views/main_css/js/func/func.js

@@ -164,5 +164,26 @@ function opennamu_page_control(url, page, data_length, data_length_max = 50) {
         }
     };
 
-    return (next() + ' ' + back()).replace(/^ /, '');
+    return (back() + ' ' + next()).replace(/^ /, '');
+}
+
+function openamu_make_list(left = '', right = '', bottom = '') {
+    let data_html = '<div class="opennamu_recent_change">';
+    data_html += left;
+    
+    data_html += '<div style="float: right;">';
+    data_html += right;
+    data_html += '</div>'
+
+    data_html += '<div style="clear: both;"></div>';
+
+    if(bottom !== "") {
+        data_html += '<hr>'
+        data_html += bottom;
+    }
+
+    data_html += '</div>';
+    data_html += '<hr class="main_hr">';
+
+    return data_html;
 }

+ 36 - 0
views/main_css/js/route/list_old_page.js

@@ -0,0 +1,36 @@
+"use strict";
+
+function opennamu_list_old_page() {
+    const url = window.location.pathname;
+    const url_split = url.split('/')
+    
+    let set_type = '';
+    let num = '';
+    if(url_split.length == 4) {
+        set_type = url_split[3];
+        num = '1';
+    } else {
+        set_type = url_split[3];
+        num = url_split[4];
+    }
+
+    fetch('/api/v2/list/document/' + set_type + '/' + num).then(function(res) {
+        return res.json();
+    }).then(function(data) {
+        data = data["data"];
+
+        let data_html = '';
+
+        for(let for_a = 0; for_a < data.length; for_a++) {
+            let doc_name = opennamu_do_url_encode(data[for_a][0]);
+
+            let right = '<a href="/w/' + doc_name + '">' + opennamu_xss_filter(data[for_a][0]) + '</a> ';
+
+            data_html += openamu_make_list(right, data[for_a][1]);
+        }
+
+        data_html += opennamu_page_control('/list/document/' + set_type + '/{}', Number(num), data.length);
+
+        document.getElementById('opennamu_list_old_page').innerHTML = data_html;
+    });
+}

+ 137 - 125
views/main_css/js/route/list_recent_change.js

@@ -1,130 +1,142 @@
 "use strict";
 
-function opennamu_list_recent_change(num, set_type) {
-    let lang_data = new FormData();
-    // user_document -> 8
-    lang_data.append('data', 'tool normal edit move delete revert new_doc edit_request user_document raw revert compare history hide history_delete send_edit');
-
-    fetch('/api/lang', {
-        method : 'post',
-        body : lang_data,
-    }).then(function(res) {
+function opennamu_list_recent_change() {
+    const option_lang = function(lang_in, lang) {
+        if(lang_in === 'user') {
+            lang_in = lang['user_document'];
+        } else if(lang[lang_in] !== undefined) {
+            lang_in = lang[lang_in];
+        }
+    
+        return lang_in;
+    }
+
+    const url = window.location.pathname;
+    const url_split = url.split('/')
+    
+    let set_type = '';
+    let num = '';
+    if(url_split.length == 2) {
+        set_type = 'normal';
+        num = '1';
+    } else {
+        set_type = url_split[3];
+        num = url_split[2];
+    }
+
+    fetch('/api/v2/recent_change/' + set_type + '/' + num).then(function(res) {
         return res.json();
-    }).then(function(lang) {
-        lang = lang["data"];
-        
-        fetch('/api/auth_list').then(function(res) {
-            return res.json();
-        }).then(function(auth) {
-            fetch('/api/recent_change/50/' + set_type + '/' + String(num)).then(function(res) {
-                return res.json();
-            }).then(function(data) {
-                let data_html = '';
-
-                let option_list = [
-                    ['normal', lang[1]],
-                    ['edit', lang[2]],
-                    ['move', lang[3]],
-                    ['delete', lang[4]],
-                    ['revert', lang[5]],
-                    ['r1', lang[6]],
-                    ['edit_request', lang[7]],
-                    ['user', lang[8]]
-                ];
-                for(let for_a = 0; for_a < option_list.length; for_a++) {
-                    data_html += '<a href="/recent_change/1/' + option_list[for_a][0] + '">(' + option_list[for_a][1] + ')</a> ';
-                }
-
-                data_html += '<hr class="main_hr">'
-
-                for(let for_a = 0; for_a < data.length; for_a++) {
-                    if(data[for_a][6] !== "" && data[for_a][1] === "") {
-                        data_html += '<div class="opennamu_recent_change">----</div>';
-                        data_html += '<hr class="main_hr">';
-
-                        continue;
-                    }
-
-                    let doc_name = opennamu_do_url_encode(data[for_a][1]);
-
-                    data_html += '<div class="opennamu_recent_change">';
-                    data_html += '<a href="/w/' + doc_name + '">' + opennamu_xss_filter(data[for_a][1]) + '</a> ';
-
-                    data_html += '<div style="float: right;">';
-
-                    data_html += '<span id="opennamu_list_recent_change_' + String(for_a) + '_over">';
-                    data_html += '<a id="opennamu_list_recent_change_' + String(for_a) + '" href="javascript:void(0);">';
-                    data_html += '⚒️';
-                    data_html += '</a>';
-                    data_html += '<span class="opennamu_popup_footnote" id="opennamu_list_recent_change_' + String(for_a) + '_load" style="display: none;"></span>';
-                    data_html += '</span>';
-                    data_html += ' | '
-
-                    if(data[for_a][6] !== "") {
-                        data_html += '<span style="color: red;">r' + data[for_a][0] + '</span>';
-                    } else {
-                        data_html += 'r' + data[for_a][0];
-                    }
-                    data_html += ' | '
-                    
-                    if(data[for_a][5] === '0') {
-                        data_html += '<span style="color: gray;">' + data[for_a][5] + '</span>';
-                    } else if(data[for_a][5].match(/\+/)) {
-                        data_html += '<span style="color: green;">' + data[for_a][5] + '</span>';
-                    } else {
-                        data_html += '<span style="color: red;">' + data[for_a][5] + '</span>';
-                    }
-                    data_html += ' | ';
-                    
-                    data_html += data[for_a][7] + ' | ';
-                    data_html += data[for_a][2];
-                    
-                    data_html += '<span style="display: none;" id="opennamu_history_tool_' + String(for_a) + '">';
-
-                    data_html += '<a href="/raw_rev/' + data[for_a][0] + '/' + doc_name + '">' + lang[9] + '</a>';
-                    data_html += ' | <a href="/revert/' + data[for_a][0] + '/' + doc_name + '">' + lang[10] + ' (r' + data[for_a][0] + ')</a>';
-                    if(Number(data[for_a][0]) > 1) {
-                        let before_rev = String(Number(data[for_a][0]) - 1);
-                        data_html += ' | <a href="/revert/' + before_rev + '/' + doc_name + '">' + lang[10] + ' (r' + before_rev + ')</a>';
-                        data_html += ' | <a href="/diff/' + before_rev + '/' + data[for_a][0] + '/' + doc_name + '">' + lang[11] + '</a>';
-                    }
-                    data_html += ' | <a href="/history/' + doc_name + '">' + lang[12] + '</a>';
-
-                    if(auth["owner"] === true || auth["hidel"] === true) {
-                        data_html += ' | <a href="/history_hidden/' + data[for_a][0] + '/' + doc_name + '">' + lang[13] + '</a>';
-                    }
-
-                    if(auth["owner"] === true) {
-                        data_html += ' | <a href="/history_delete/' + data[for_a][0] + '/' + doc_name + '">' + lang[14] + '</a>';
-                        data_html += ' | <a href="/history_send/' + data[for_a][0] + '/' + doc_name + '">' + lang[15] + '</a>';
-                    }
-
-                    data_html += '</span>';
-                    
-                    data_html += '</div>'
-                    data_html += '<div style="clear: both;"></div>';
-
-                    if(data[for_a][4] !== "") {
-                        data_html += '<hr>'
-                        data_html += opennamu_send_render(opennamu_xss_filter(data[for_a][4]));
-                    }
-
-                    data_html += '</div>';
-                    data_html += '<hr class="main_hr">';
-                }
-
-                data_html += opennamu_page_control('/recent_change/{}/' + set_type, num, data.length);
-
-                document.getElementById('opennamu_list_recent_change').innerHTML = data_html;
-
-                for(let for_a = 0; for_a < data.length; for_a++) {
-                    if(data[for_a][6] !== "" && data[for_a][1] === "") {
-                        continue;
-                    }
-
-                    document.getElementById('opennamu_list_recent_change_' + String(for_a)).addEventListener("click", function() { opennamu_do_footnote_popover('opennamu_list_recent_change_' + String(for_a), '', 'opennamu_history_tool_' + String(for_a)); });
-                }
-            });
-        });
+    }).then(function(data) {
+        let lang = data["language"];
+        let auth = data["auth"];
+        data = data["data"];
+
+        let data_html = '';
+
+        let option_list = ['normal', 'edit', 'move', 'delete', 'revert', 'r1', 'edit_request', 'user', 'file', 'category'];
+        for(let for_a = 0; for_a < option_list.length; for_a++) {
+            data_html += '<a href="/recent_change/1/' + option_list[for_a] + '">(' + option_lang(option_list[for_a], lang) + ')</a> ';
+        }
+
+        data_html += '<hr class="main_hr">'
+
+        let date_heading = '';
+        for(let for_a = 0; for_a < data.length; for_a++) {
+            if(data[for_a][6] !== "" && data[for_a][1] === "") {
+                data_html += openamu_make_list('----');
+
+                continue;
+            }
+
+            let doc_name = opennamu_do_url_encode(data[for_a][1]);
+            
+            let left = '<a href="/w/' + doc_name + '">' + opennamu_xss_filter(data[for_a][1]) + '</a> ';
+
+            let right = '<span id="opennamu_list_recent_change_' + String(for_a) + '_over">';
+
+            right += '<a id="opennamu_list_recent_change_' + String(for_a) + '" href="javascript:void(0);">';
+            right += '⚒️';
+            right += '</a>';
+            right += '<span class="opennamu_popup_footnote" id="opennamu_list_recent_change_' + String(for_a) + '_load" style="display: none;"></span>';
+            right += '</span>';
+            right += ' | '
+
+            if(data[for_a][6] !== "") {
+                right += '<span style="color: red;">r' + data[for_a][0] + '</span>';
+            } else {
+                right += 'r' + data[for_a][0];
+            }
+            right += ' | '
+            
+            if(data[for_a][5] === '0') {
+                right += '<span style="color: gray;">' + data[for_a][5] + '</span>';
+            } else if(data[for_a][5].match(/\+/)) {
+                right += '<span style="color: green;">' + data[for_a][5] + '</span>';
+            } else {
+                right += '<span style="color: red;">' + data[for_a][5] + '</span>';
+            }
+            right += ' | ';
+            
+            right += data[for_a][7] + ' | ';
+            
+            let edit_type = 'edit';
+            if(data[for_a][8] !== '') {
+                edit_type = data[for_a][8];
+            }
+
+            right += option_lang(edit_type, lang) + ' | ';
+
+            let time_split = data[for_a][2].split(' ');
+
+            if(date_heading !== time_split[0]) {
+                data_html += '<h2>' + time_split[0] + '</h2>';
+                date_heading = time_split[0];
+            }
+
+            if(time_split.length > 1) {
+                right += time_split[1];
+            }
+            
+            right += '<span style="display: none;" id="opennamu_history_tool_' + String(for_a) + '">';
+
+            right += '<a href="/raw_rev/' + data[for_a][0] + '/' + doc_name + '">' + lang['raw'] + '</a>';
+            right += ' | <a href="/revert/' + data[for_a][0] + '/' + doc_name + '">' + lang['revert'] + ' (r' + data[for_a][0] + ')</a>';
+            if(Number(data[for_a][0]) > 1) {
+                let before_rev = String(Number(data[for_a][0]) - 1);
+                right += ' | <a href="/revert/' + before_rev + '/' + doc_name + '">' + lang['revert'] + ' (r' + before_rev + ')</a>';
+                right += ' | <a href="/diff/' + before_rev + '/' + data[for_a][0] + '/' + doc_name + '">' + lang['compare'] + '</a>';
+            }
+            right += ' | <a href="/history/' + doc_name + '">' + lang['history'] + '</a>';
+
+            if(auth["owner"] === true || auth["hidel"] === true) {
+                right += ' | <a href="/history_hidden/' + data[for_a][0] + '/' + doc_name + '">' + lang['hide'] + '</a>';
+            }
+
+            if(auth["owner"] === true) {
+                right += ' | <a href="/history_delete/' + data[for_a][0] + '/' + doc_name + '">' + lang['history_delete'] + '</a>';
+                right += ' | <a href="/history_send/' + data[for_a][0] + '/' + doc_name + '">' + lang['send_edit'] + '</a>';
+            }
+
+            right += '</span>';
+            
+            let bottom = '';
+            if(data[for_a][4] !== "") {
+                bottom = opennamu_send_render(opennamu_xss_filter(data[for_a][4]));
+            }
+
+            data_html += openamu_make_list(left, right, bottom);
+        }
+
+        data_html += opennamu_page_control('/recent_change/{}/' + set_type, Number(num), data.length);
+
+        document.getElementById('opennamu_list_recent_change').innerHTML = data_html;
+
+        for(let for_a = 0; for_a < data.length; for_a++) {
+            if(data[for_a][6] !== "" && data[for_a][1] === "") {
+                continue;
+            }
+
+            document.getElementById('opennamu_list_recent_change_' + String(for_a)).addEventListener("click", function() { opennamu_do_footnote_popover('opennamu_list_recent_change_' + String(for_a), '', 'opennamu_history_tool_' + String(for_a)); });
+        }
     });
 }

+ 44 - 44
views/main_css/js/route/list_recent_discuss.js

@@ -1,58 +1,58 @@
 "use strict";
 
-function opennamu_list_recent_discuss(tool = 'normal') {
-    let lang_data = new FormData();
-    lang_data.append('data', 'tool normal close_discussion open_discussion_list closed')
-
-    fetch('/api/lang', {
-        method : 'post',
-        body : lang_data,
-    }).then(function(res) {
+function opennamu_list_recent_discuss() {
+    const url = window.location.pathname;
+    const url_split = url.split('/')
+    
+    let set_type = '';
+    let num = '';
+    if(url_split.length == 2) {
+        set_type = 'normal';
+        num = '1';
+    } else {
+        set_type = url_split[3];
+        num = url_split[2];
+    }
+
+    fetch('/api/v2/recent_discuss/' + set_type + '/' + num).then(function(res) {
         return res.json();
-    }).then(function(lang) {
-        lang = lang["data"];
-
-        fetch('/api/recent_discuss/' + tool + '/50').then(function(res) {
-            return res.json();
-        }).then(function(data) {
-            let data_html = '';
-
-            let option_list = [
-                ['normal', lang[1]],
-                ['close', lang[2]],
-                ['open', lang[3]]
-            ];
-            for(let for_a = 0; for_a < option_list.length; for_a++) {
-                data_html += '<a href="/recent_discuss/' + option_list[for_a][0] + '">(' + option_list[for_a][1] + ')</a> ';
-            }
+    }).then(function(data) {
+        let lang = data["language"];
+        data = data["data"];
+
+        let data_html = '';
 
-            data_html += '<hr class="main_hr">'
+        let option_list = [
+            ['normal', lang['normal']],
+            ['close', lang['close_discussion']],
+            ['open', lang['open_discussion']]
+        ];
+        for(let for_a = 0; for_a < option_list.length; for_a++) {
+            data_html += '<a href="/recent_discuss/1/' + option_list[for_a][0] + '">(' + option_list[for_a][1] + ')</a> ';
+        }
 
-            for(let for_a = 0; for_a < data.length; for_a++) {
-                let doc_name = opennamu_do_url_encode(data[for_a][0]);
+        data_html += '<hr class="main_hr">'
 
-                data_html += '<div class="opennamu_recent_change">';
-                data_html += '<a href="/thread/' + data[for_a][3] + '">' + opennamu_xss_filter(data[for_a][1]) + '</a> ';
-                data_html += '<a href="/w/' + doc_name + '">(' + opennamu_xss_filter(data[for_a][0]) + ')</a> ';
+        for(let for_a = 0; for_a < data.length; for_a++) {
+            let doc_name = opennamu_do_url_encode(data[for_a][0]);
 
-                data_html += '<div style="float: right;">';
+            let left = '<a href="/thread/' + data[for_a][3] + '">' + opennamu_xss_filter(data[for_a][1]) + '</a> ';
+            left += '<a href="/w/' + doc_name + '">(' + opennamu_xss_filter(data[for_a][0]) + ')</a> ';
 
-                if(data[for_a][4] === 'O') {
-                    data_html += lang[4] + ' | ';
-                }
+            let right = '';
+            if(data[for_a][4] === 'O') {
+                right += lang['closed'] + ' | ';
+            }
 
-                data_html += '<a href="/thread/' + data[for_a][3] + '#' + data[for_a][7] + '">#' + data[for_a][7] + '</a> | ';
-                data_html += data[for_a][6] + ' | ';
-                data_html += data[for_a][2];
+            right += '<a href="/thread/' + data[for_a][3] + '#' + data[for_a][7] + '">#' + data[for_a][7] + '</a> | ';
+            right += data[for_a][6] + ' | ';
+            right += data[for_a][2];
 
-                data_html += '</div>';
-                data_html += '<div style="clear: both;"></div>';
+            data_html += openamu_make_list(left, right);
+        }
 
-                data_html += '</div>';
-                data_html += '<hr class="main_hr">';
-            }
+        data_html += opennamu_page_control('/recent_discuss/{}/' + set_type, Number(num), data.length);
 
-            document.getElementById('opennamu_list_recent_discuss').innerHTML = data_html;
-        });
+        document.getElementById('opennamu_list_recent_discuss').innerHTML = data_html;
     });
 }

+ 0 - 1
views/main_css/js/route/render.js

@@ -89,7 +89,6 @@ function opennamu_heading_folding(data, element = '') {
     }
     
     if(element !== '') {
-        console.log(element.innerHTML);
         if(element.innerHTML !== '⊖') {
             element.innerHTML = '⊖';
         } else {

+ 1 - 1
views/main_css/js/route/view.js

@@ -43,8 +43,8 @@ function opennamu_view_w_raw_preview() {
     if(document.getElementById('opennamu_edit_textarea')) {
         data = document.getElementById('opennamu_edit_textarea').value;
     }
-    console.log(data);
 
+    console.log(name);
     opennamu_do_render('opennamu_preview_area', data, name);
 }
 

+ 0 - 2
views/main_css/js/route/w_watch_list.js

@@ -20,8 +20,6 @@ function opennamu_w_watch_list(page = 1) {
             do_type = 'watch_list'
         }
 
-        console.log();
-
         let split_url = url.split('/');
         let doc_name = split_url.slice(3, undefined);