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; }