mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-03 09:31:28 +01:00
iOS 12 fixes
This commit is contained in:
parent
f35313ad3a
commit
ecd25ebaff
5 changed files with 49 additions and 33 deletions
|
@ -1,5 +1,6 @@
|
||||||
.media-box {
|
.media-box {
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
|
flex-flow: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: var(--media-border);
|
border: var(--media-border);
|
||||||
|
|
|
@ -155,7 +155,7 @@ function toggleSearchNativeAutocomplete() {
|
||||||
const enable = store.get('enable_search_ac');
|
const enable = store.get('enable_search_ac');
|
||||||
|
|
||||||
const searchFields = $$<AutocompletableInputElement>(
|
const searchFields = $$<AutocompletableInputElement>(
|
||||||
':is(input, textarea)[data-autocomplete][data-autocomplete-mode=search]',
|
'input[data-autocomplete][data-autocomplete-mode=search], textarea[data-autocomplete][data-autocomplete-mode=search]',
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const searchField of searchFields) {
|
for (const searchField of searchFields) {
|
||||||
|
|
|
@ -144,8 +144,8 @@ function getFontRemSize(): string {
|
||||||
async function createFp(): Promise<string> {
|
async function createFp(): Promise<string> {
|
||||||
const prints: string[] = [
|
const prints: string[] = [
|
||||||
navigator.userAgent,
|
navigator.userAgent,
|
||||||
navigator.hardwareConcurrency.toString(),
|
navigator.hardwareConcurrency?.toString(),
|
||||||
navigator.maxTouchPoints.toString(),
|
navigator.maxTouchPoints?.toString(),
|
||||||
navigator.language,
|
navigator.language,
|
||||||
await getKeyboardData(),
|
await getKeyboardData(),
|
||||||
getMemoryData(),
|
getMemoryData(),
|
||||||
|
|
|
@ -34,34 +34,48 @@ import { pollOptionCreator } from './poll';
|
||||||
import { warnAboutPMs } from './pmwarning';
|
import { warnAboutPMs } from './pmwarning';
|
||||||
import { imageSourcesCreator } from './sources';
|
import { imageSourcesCreator } from './sources';
|
||||||
|
|
||||||
|
const functions = [
|
||||||
|
loadBooruData,
|
||||||
|
listenAutocomplete,
|
||||||
|
registerEvents,
|
||||||
|
setupBurgerMenu,
|
||||||
|
bindCaptchaLinks,
|
||||||
|
initImagesClientside,
|
||||||
|
setupComments,
|
||||||
|
setupDupeReports,
|
||||||
|
setSesCookie,
|
||||||
|
setupGalleryEditing,
|
||||||
|
bindImageTarget,
|
||||||
|
setupEvents,
|
||||||
|
setupNotifications,
|
||||||
|
setupPreviews,
|
||||||
|
setupQuickTag,
|
||||||
|
initializeListener,
|
||||||
|
setupSettings,
|
||||||
|
listenForKeys,
|
||||||
|
initTagDropdown,
|
||||||
|
setupTagListener,
|
||||||
|
setupTagEvents,
|
||||||
|
setupTimestamps,
|
||||||
|
setupImageUpload,
|
||||||
|
setupSearch,
|
||||||
|
setupToolbar,
|
||||||
|
hideStaffTools,
|
||||||
|
pollOptionCreator,
|
||||||
|
warnAboutPMs,
|
||||||
|
imageSourcesCreator,
|
||||||
|
];
|
||||||
|
|
||||||
whenReady(() => {
|
whenReady(() => {
|
||||||
loadBooruData();
|
functions.forEach(fn => {
|
||||||
listenAutocomplete();
|
try {
|
||||||
registerEvents();
|
fn();
|
||||||
setupBurgerMenu();
|
} catch (err: unknown) {
|
||||||
bindCaptchaLinks();
|
console.log(`${fn.name} ran with errors.`);
|
||||||
initImagesClientside();
|
|
||||||
setupComments();
|
if (err instanceof Error) {
|
||||||
setupDupeReports();
|
console.log(`The error was:\n\n${err.message}`);
|
||||||
setSesCookie();
|
}
|
||||||
setupGalleryEditing();
|
}
|
||||||
bindImageTarget();
|
});
|
||||||
setupEvents();
|
|
||||||
setupNotifications();
|
|
||||||
setupPreviews();
|
|
||||||
setupQuickTag();
|
|
||||||
initializeListener();
|
|
||||||
setupSettings();
|
|
||||||
listenForKeys();
|
|
||||||
initTagDropdown();
|
|
||||||
setupTagListener();
|
|
||||||
setupTagEvents();
|
|
||||||
setupTimestamps();
|
|
||||||
setupImageUpload();
|
|
||||||
setupSearch();
|
|
||||||
setupToolbar();
|
|
||||||
hideStaffTools();
|
|
||||||
pollOptionCreator();
|
|
||||||
warnAboutPMs();
|
|
||||||
imageSourcesCreator();
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -28,6 +28,7 @@ export default defineConfig(({ command, mode }: ConfigEnv): ViteUserConfig => {
|
||||||
server: {
|
server: {
|
||||||
host: '0.0.0.0',
|
host: '0.0.0.0',
|
||||||
port: 5173,
|
port: 5173,
|
||||||
|
cors: true,
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue