Skip to content

Commit

Permalink
Move the last function as util
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Jan 7, 2025
1 parent 2c54cb4 commit eded6f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/javascript/application.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ import 'src/legacy/common'
import 'src/legacy/post'
import 'src/legacy/post-upload-form'
import 'src/legacy/post_mode_menu'
import 'src/legacy/touchscreen-web-app-helpers'

import 'src/boot'
2 changes: 2 additions & 0 deletions app/javascript/src/boot.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import User from './classes/user'
import UserRecord from './classes/user_record'
import WindowTitleHandler from './classes/window_title_handler'
import { initTextAreas } from './utils/init_text_areas'
import { initializeFullScreenBrowserHandlers } from './utils/initialize_full_screen_browser_handlers'
import { onKey } from './utils/on_key'

Rails.start()
Expand Down Expand Up @@ -76,3 +77,4 @@ window.TagCompletionBox = TagCompletionBox
window.ThumbnailView = ThumbnailView
window.UploadSimilarSearch = UploadSimilarSearch
window.WindowTitleHandler = WindowTitleHandler
window.initializeFullScreenBrowserHandlers = initializeFullScreenBrowserHandlers
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import { maintainUrlHash } from 'src/utils/maintain_url_hash'
# of the browser mobile hacks no longer make sense: separate display viewports, touch
# dragging, double-click zooming and their associated side-effects.
###

window.InitializeFullScreenBrowserHandlers = ->
export initializeFullScreenBrowserHandlers = ->
# These handlers deal with heavily browser-specific issues. Only install them
# on browsers that have been tested to need them.
if navigator.userAgent.indexOf('Android') != -1 and navigator.userAgent.indexOf('WebKit') != -1
Expand Down
2 changes: 1 addition & 1 deletion app/views/post/browse.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@

document.observe("dom:loaded", function()
{
InitializeFullScreenBrowserHandlers();
initializeFullScreenBrowserHandlers();
Post.init_blacklisted();

var normalize_hash = function(h)
Expand Down

0 comments on commit eded6f7

Please sign in to comment.