mirror of
https://github.com/SilenceLurker/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 14:45:51 +00:00
Update message-table-renderer.js
This commit is contained in:
@@ -3,6 +3,7 @@ import { extension_settings } from '/scripts/extensions.js';
|
||||
import { extensionName } from '../utils/settings.js';
|
||||
|
||||
const TABLE_CONTAINER_ID = 'amily2-chat-table-container';
|
||||
const isTouchDevice = () => window.matchMedia('(pointer: coarse)').matches;
|
||||
|
||||
function renderTablesToHtml(tables, highlights) {
|
||||
if (!tables || tables.length === 0) {
|
||||
@@ -53,6 +54,11 @@ function removeTableContainer() {
|
||||
}
|
||||
|
||||
function bindSwipePreventer(container) {
|
||||
// Only apply this logic on mobile/touch devices
|
||||
if (!isTouchDevice()) {
|
||||
return;
|
||||
}
|
||||
|
||||
let touchstartX = 0;
|
||||
let touchstartY = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user