Surplus_Up (2DU) 6 лет назад
Родитель
Сommit
f6411d849b
4 измененных файлов с 22 добавлено и 12 удалено
  1. 3 3
      route/tool/func.py
  2. 14 6
      route/tool/set_mark/namumark.py
  3. 2 2
      version.json
  4. 3 1
      views/main_css/css/main.css

+ 3 - 3
route/tool/func.py

@@ -187,9 +187,6 @@ def update(ver_num, set_data):
             curs.execute(db_change("update topic set code = ? where title = ? and sub = ?"), [i[2], i[0], i[1]])
             curs.execute(db_change("update rd set code = ? where title = ? and sub = ?"), [i[2], i[0], i[1]])
 
-    if ver_num < 3171600:
-        curs.execute(db_change('delete from cache_data'))
-
     if ver_num < 3171800:
         curs.execute(db_change("select data from other where name = 'recaptcha'"))
         change_rec = curs.fetchall()
@@ -206,6 +203,9 @@ def update(ver_num, set_data):
         
         with open('data/mysql.json', 'w') as f:
             f.write('{ "user" : "' + get_data_mysql['user'] + '", "password" : "' + get_data_mysql['password'] + '", "host" : "localhost" }')
+            
+    if ver_num < 3180200:
+        curs.execute(db_change('delete from cache_data'))
 
     conn.commit()
     print('Update pass')

+ 14 - 6
route/tool/set_mark/namumark.py

@@ -5,7 +5,15 @@ import html
 import re
 
 def nowiki_js(data):
-    return re.sub('^\n', '', data.replace('\\', '\\\\').replace('"', '\\"').replace('\r', '')).replace('\n', '<br>')
+    data = data.replace('\\', '\\\\')
+    data = data.replace('"', '\\"')
+    data = data.replace('\r', '')
+    
+    data = re.sub('^\n', '', data)
+
+    data = data.replace('\n', '<br>')
+
+    return data
 
 def link_fix(main_link):
     global end_data
@@ -1021,16 +1029,16 @@ def namumark(conn, data, title, main_num, include_num):
                     category += '<div id="cate_all"><hr><div id="cate">Category : '
 
                 main_link = category_re.sub('category:', main_link)
+                link_id = ''
 
                 curs.execute(tool.db_change("select title from data where title = ?"), [main_link])
                 if re.search('#blur', main_link):
-                    see_link = 'Hidden'
-                    link_id = 'id="inside"'
-
-                    main_link = re.sub('#blur', '', main_link)
+                    link_id = ' hidden_link'
+                    main_link = main_link.replace('#blur', '')
+                    see_link = see_link.replace('#blur', '')
 
                 backlink += [[title, main_link, 'cat']]
-                category += '<a class="' + include_num + 'link_finder" href="/w/' + tool.url_pas(main_link) + '">' + category_re.sub('', see_link) + '</a> | '
+                category += '<a class="' + include_num + 'link_finder' + link_id + '" href="/w/' + tool.url_pas(main_link) + '">' + category_re.sub('', see_link) + '</a> | '
 
                 data = re.sub('\[\[((?:(?!\[\[|\]\]|<\/td>).)+)\]\]', '', data, 1)
             elif re.search('^wiki:', main_link):

+ 2 - 2
version.json

@@ -1,7 +1,7 @@
 {
     "master" : {
-        "r_ver" : "v3.1.8-master-01",
-        "c_ver" : "3172800",
+        "r_ver" : "v3.1.8-master-02",
+        "c_ver" : "3180200",
         "s_ver" : "8"
     }, "stable" : {
         "r_ver" : "v3.1.7-stable-01",

+ 3 - 1
views/main_css/css/main.css

@@ -47,4 +47,6 @@ blockquote { background-image: url(/views/acme/img/quote.png); background-positi
 .table_safe { max-width: 100%; }
 .change_space { white-space: pre-line; }
 div#topic_scroll { max-height: 500px; overflow: scroll; -ms-overflow-style: none; scrollbar-width: none; }
-div#topic_scroll::-webkit-scrollbar { display: none; }
+div#topic_scroll::-webkit-scrollbar { display: none; }
+.hidden_link { filter: blur(3px); }
+.hidden_link:hover { filter: none; }