Skip to content

Commit

Permalink
Merge pull request #34 from hideki0403/develop
Browse files Browse the repository at this point in the history
release: v1.2.5
  • Loading branch information
hideki0403 authored Jun 20, 2022
2 parents ac123b5 + 85183b3 commit b75d39d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "better-japanese",
"version": "1.2.4",
"version": "1.2.5",
"description": "",
"main": "index.js",
"scripts": {
Expand Down
9 changes: 5 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const betterJapanese = {
},

initAfterLoad: async function() {
betterJapanese.origins.updateMenu = Game.UpdateMenu
betterJapanese.origins.sayTime = Game.sayTime
betterJapanese.origins.beautify = Beautify
betterJapanese.origins.parseLoc = parseLoc
Expand All @@ -48,12 +47,14 @@ const betterJapanese = {
}

// メニューに独自ボタンを実装
Game.UpdateMenu = function() {
betterJapanese.origins.updateMenu()
// この方法で実装しないとCCSEなどのメニュー独自実装Modと競合してしまう
let origin = eval('Game.UpdateMenu.toString()').split('\n')
origin.splice(origin.length - 1, 0, `
if (Game.onMenu == 'prefs') {
betterJapanese.injectMenu()
}
}
`)
eval(`Game.UpdateMenu = ${origin.join('\n')}`)

// 時間表記からカンマを取り除く
Game.sayTime = function(time, detail) {
Expand Down

0 comments on commit b75d39d

Please sign in to comment.