Browse Source

add stats

dev
thuhole 5 years ago
parent
commit
20b09e97a2
  1. 2
      README.md
  2. 2
      public/CNAME
  3. 4
      public/stats.js
  4. 4
      src/text_splitter.js

2
README.md

@ -1,4 +1,4 @@
网页版 T大树洞:[https://thuhole.tech/](https://thuhole.tech/) 网页版 T大树洞:[https://thuhole.com/](https://thuhole.com/)
![https://api.travis-ci.org/thuhole/webhole.svg?branch=master](https://api.travis-ci.org/thuhole/webhole.svg?branch=master) ![https://api.travis-ci.org/thuhole/webhole.svg?branch=master](https://api.travis-ci.org/thuhole/webhole.svg?branch=master)

2
public/CNAME

@ -1 +1 @@
tst.thuhole.tech tst.thuhole.com

4
public/stats.js

@ -1,5 +1,5 @@
var _czc = _czc || []; var _czc = _czc || [];
_czc.push(["_setAccount", "1279007303"]); _czc.push(["_setAccount", "1279007496"]);
_czc.push(["_setCustomVar", "has_token", localStorage['TOKEN'] ? 'yes' : 'no', 1]); _czc.push(["_setCustomVar", "has_token", localStorage['TOKEN'] ? 'yes' : 'no', 1]);
_czc.push(["_setCustomVar", "standalone", ((window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone)) ? 'yes' : 'no', 1]); _czc.push(["_setCustomVar", "standalone", ((window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone)) ? 'yes' : 'no', 1]);
_czc.push(["_setCustomVar", "build_info", "%REACT_APP_BUILD_INFO%" || '---']); _czc.push(["_setCustomVar", "build_info", "%REACT_APP_BUILD_INFO%" || '---']);
@ -21,5 +21,5 @@ var cnzz_s_tag = document.createElement('script');
cnzz_s_tag.type = 'text/javascript'; cnzz_s_tag.type = 'text/javascript';
cnzz_s_tag.async = true; cnzz_s_tag.async = true;
cnzz_s_tag.charset = "utf-8"; cnzz_s_tag.charset = "utf-8";
cnzz_s_tag.src = "https://w.cnzz.com/c.php?id=1279007303&async=1"; cnzz_s_tag.src = "https://w.cnzz.com/c.php?id=1279007496&async=1";
document.head.appendChild(cnzz_s_tag); document.head.appendChild(cnzz_s_tag);

4
src/text_splitter.js

@ -2,8 +2,8 @@
// export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])([2-9]\d{4,5}|1\d{4,6})(?![\d\u20e3\ufe0e\ufe0f])/g; // export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])([2-9]\d{4,5}|1\d{4,6})(?![\d\u20e3\ufe0e\ufe0f])/g;
export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])(#\d{1,7})(?![\d\u20e3\ufe0e\ufe0f])/g; export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])(#\d{1,7})(?![\d\u20e3\ufe0e\ufe0f])/g;
// TODO: fix this re // TODO: fix this re
// export const URL_PID_RE=/((?:https?:\/\/)?thuhole\.tech\/?#(?:#|%23)([2-9]\d{4,5}|1\d{4,6}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g; // export const URL_PID_RE=/((?:https?:\/\/)?thuhole\.com\/?#(?:#|%23)([2-9]\d{4,5}|1\d{4,6}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g;
export const URL_PID_RE=/((?:https?:\/\/)?thuhole\.tech\/?#(?:#|%23)(\d{1,7}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g; export const URL_PID_RE=/((?:https?:\/\/)?thuhole\.com\/?#(?:#|%23)(\d{1,7}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g;
export const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Jolly|Kind|Little|Magic|Naïve|Old|Powerful|Quiet|Rich|Superman|THU|Undefined|Valuable|Wifeless|Xiangbuchulai|Young|Zombie)\s)?(?:Alice|Bob|Carol|Dave|Eve|Francis|Grace|Hans|Isabella|Jason|Kate|Louis|Margaret|Nathan|Olivia|Paul|Queen|Richard|Susan|Thomas|Uma|Vivian|Winnie|Xander|Yasmine|Zach)|You Win(?: \d+)?|洞主)(?![A-Za-z])/gi; export const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Jolly|Kind|Little|Magic|Naïve|Old|Powerful|Quiet|Rich|Superman|THU|Undefined|Valuable|Wifeless|Xiangbuchulai|Young|Zombie)\s)?(?:Alice|Bob|Carol|Dave|Eve|Francis|Grace|Hans|Isabella|Jason|Kate|Louis|Margaret|Nathan|Olivia|Paul|Queen|Richard|Susan|Thomas|Uma|Vivian|Winnie|Xander|Yasmine|Zach)|You Win(?: \d+)?|洞主)(?![A-Za-z])/gi;
export const URL_RE=/(^|[^.@a-zA-Z0-9_])((?:https?:\/\/)?(?:(?:[\w-]+\.)+[a-zA-Z]{2,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::\d{1,5})?(?:\/[\w~!@#$%^&*()\-_=+[\]{};:,./?|]*)?)(?![a-zA-Z0-9])/gi; export const URL_RE=/(^|[^.@a-zA-Z0-9_])((?:https?:\/\/)?(?:(?:[\w-]+\.)+[a-zA-Z]{2,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::\d{1,5})?(?:\/[\w~!@#$%^&*()\-_=+[\]{};:,./?|]*)?)(?![a-zA-Z0-9])/gi;

Loading…
Cancel
Save