diff options
author | Starfall <root@starfall.blue> | 2020-04-11 20:04:56 -0500 |
---|---|---|
committer | Starfall <root@starfall.blue> | 2020-04-11 20:04:56 -0500 |
commit | b107e4f771f036b214563764fcd95786f8016ee7 (patch) | |
tree | 22397105f42f30eceacdf84671d1c4d807c9dd73 /app/javascript/core | |
parent | 144ecfcfc7d9974117f1563084409a9558290a60 (diff) | |
parent | c47be5bd864a1f5244f35122ba7fae31a149c73d (diff) |
Merge branch 'glitch'
Diffstat (limited to 'app/javascript/core')
-rw-r--r-- | app/javascript/core/admin.js | 6 | ||||
-rw-r--r-- | app/javascript/core/public.js | 16 | ||||
-rw-r--r-- | app/javascript/core/settings.js | 2 |
3 files changed, 7 insertions, 17 deletions
diff --git a/app/javascript/core/admin.js b/app/javascript/core/admin.js index e4d683dd0..f2334c254 100644 --- a/app/javascript/core/admin.js +++ b/app/javascript/core/admin.js @@ -1,6 +1,6 @@ // This file will be loaded on admin pages, regardless of theme. -import { delegate } from 'rails-ujs'; +import { delegate } from '@rails/ujs'; import ready from '../mastodon/ready'; const batchCheckboxClassName = '.batch-checkbox input[type="checkbox"]'; @@ -32,6 +32,10 @@ delegate(document, '.media-spoiler-hide-button', 'click', () => { }); }); +delegate(document, '.filter-subset--with-select select', 'change', ({ target }) => { + target.form.submit(); +}); + const onDomainBlockSeverityChange = (target) => { const rejectMediaDiv = document.querySelector('.input.with_label.domain_block_reject_media'); const rejectReportsDiv = document.querySelector('.input.with_label.domain_block_reject_reports'); diff --git a/app/javascript/core/public.js b/app/javascript/core/public.js index 0f4222139..39f198fe7 100644 --- a/app/javascript/core/public.js +++ b/app/javascript/core/public.js @@ -3,7 +3,7 @@ import createHistory from 'history/createBrowserHistory'; import ready from '../mastodon/ready'; -const { delegate } = require('rails-ujs'); +const { delegate } = require('@rails/ujs'); const { length } = require('stringz'); delegate(document, '.webapp-btn', 'click', ({ target, button }) => { @@ -14,20 +14,6 @@ delegate(document, '.webapp-btn', 'click', ({ target, button }) => { return false; }); -delegate(document, '.status__content__spoiler-link', 'click', function() { - const contentEl = this.parentNode.parentNode.querySelector('.e-content'); - - if (contentEl.style.display === 'block') { - contentEl.style.display = 'none'; - this.parentNode.style.marginBottom = 0; - } else { - contentEl.style.display = 'block'; - this.parentNode.style.marginBottom = null; - } - - return false; -}); - delegate(document, '.modal-button', 'click', e => { e.preventDefault(); diff --git a/app/javascript/core/settings.js b/app/javascript/core/settings.js index e0cb944e0..e02c91cc7 100644 --- a/app/javascript/core/settings.js +++ b/app/javascript/core/settings.js @@ -1,7 +1,7 @@ // This file will be loaded on settings pages, regardless of theme. import escapeTextContentForBrowser from 'escape-html'; -const { delegate } = require('rails-ujs'); +const { delegate } = require('@rails/ujs'); import emojify from '../mastodon/features/emoji/emoji'; delegate(document, '#account_display_name', 'input', ({ target }) => { |