From b96fd62eef526cc5e25b24d4461f9228df2b230f Mon Sep 17 00:00:00 2001 From: Wiwi Kuan Date: Mon, 21 Jun 2021 01:04:35 +0800 Subject: [PATCH] Add files via upload --- web/data.js | 2 +- web/niceidea.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/data.js b/web/data.js index ddebbc5..cf9fdf2 100644 --- a/web/data.js +++ b/web/data.js @@ -321,7 +321,7 @@ let around = ['戀愛中的ooo', '來一個ooo', '我把ooo弄丟了', 'ooo好神奇', - '你才ooo,你全家都xxx', + '你才ooo,你全家都ooo', '失眠的ooo', '明天的ooo', '愛的ooo', diff --git a/web/niceidea.js b/web/niceidea.js index 94ed99e..887481c 100644 --- a/web/niceidea.js +++ b/web/niceidea.js @@ -131,8 +131,8 @@ function randomTempo() { function randomTitle() { let result = around[Math.floor(Math.random() * around.length)]; - result = result.replace("ooo", noun[Math.floor(Math.random() * noun.length)]); - result = result.replace("xxx", noun[Math.floor(Math.random() * noun.length)]); + result = result.replace(/ooo/g, noun[Math.floor(Math.random() * noun.length)]); + result = result.replace(/xxx/g, noun[Math.floor(Math.random() * noun.length)]); document.getElementById("titleResult").innerHTML = "🤔 " + result; }