2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-21 17:37:09 +00:00

Explicit dependencies

This commit is contained in:
nanaya 2025-01-21 02:21:42 +09:00
parent 3717b3000e
commit 109793e105
2 changed files with 5 additions and 3 deletions

View File

@ -51,7 +51,7 @@ window.TagCompletion = new TagCompletion
window.TagScript = new TagScript
window.UrlHash = new UrlHashHandler
window.User = new User
window.autocomplete = new Autocomplete
window.autocomplete = new Autocomplete(window.TagCompletion)
window.checkAll = new CheckAll
window.comment = new Comment
window.dmail = new Dmail

View File

@ -1,4 +1,6 @@
import autocompleter from 'autocompleter'
import TagCompletion from './tag_completion'
import TagCompletionBox from './tag_completion_box'
$ = jQuery
@ -7,7 +9,7 @@ autocompleterMap = (match) =>
value: match
export default class Autocomplete
constructor: ->
constructor: (@tagCompletionInstance) ->
$ =>
@_genericCompletionAll()
@_tagCompletion()
@ -43,4 +45,4 @@ export default class Autocomplete
return if !tags?
new TagCompletionBox(tags)
TagCompletion?.observe_tag_changes_on_submit editForm, tags
@tagCompletionInstance.observe_tag_changes_on_submit editForm, tags