// ==UserScript== // @name VoidVerified // @namespace http://tampermonkey.net/ // @version 1.15.0 // @author voidnyan // @source https://github.com/voidnyan/void-verified // @license MIT // @match https://anilist.co/* // @grant GM.xmlHttpRequest // @description Social enhancements for AniList. // @downloadURL none // ==/UserScript== /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ "./node_modules/css-loader/dist/cjs.js!./src/assets/styles/keyInput.css": /***/ ((module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `.void-key-input { width: 15ch; text-align: center; } .void-markdown-shortcut-dialog { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 12px; row-gap: 6px; align-items: center; } `, ""]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/assets/styles/markdownDialog.css": /***/ ((module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `.void-markdown-dialog-container { background: rgb(var(--color-foreground)); border-radius: 4px; margin: 10px 0px; } .void-markdown-dialog-header { width: 100%; background: rgb(var(--color-foreground-grey-dark)); padding: 12px; border-radius: 4px 4px 0px 0px; user-select: none; } .activity-edit:has(.markdown-editor[style*="display: none;"]) .void-markdown-dialog-container, .void-markdown-dialog-container[closed="true"] { display: none; } .void-markdown-dialog-header.void-flex { display: flex; justify-content: space-between; } .void-markdown-dialog-body { padding: 12px; } `, ""]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/assets/styles/styles.css": /***/ ((module, __webpack_exports__, __webpack_require__) => { /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `:root { --void-info: 46, 149, 179; --void-error: 188, 53, 46; --void-success: 80, 162, 80; --void-warning: 232, 180, 2; } a[href="/settings/developer" i]::after{content: " & Void"} .void-settings .void-nav ol { display: flex; margin: 8px 0px; padding: 0; } .void-nav { margin-top: 3rem; } .void-settings .void-nav li { list-style: none; display: block; color: rgb(var(--color-text)); padding: 4px 8px; text-transform: capitalize; background: rgb(var(--color-foreground-blue)); cursor: pointer; min-width: 50px; text-align: center; font-size: 1.4rem; } .void-settings .void-nav li.void-active, .void-settings .void-nav li:hover { background: rgb(var(--color-blue)); color: rgb(var(--color-text-bright)); } .void-settings .void-nav li:first-child { border-radius: 4px 0px 0px 4px; } .void-settings .void-nav li:last-child { border-radius: 0px 4px 4px 0px; } .void-settings .void-settings-header { margin-top: 30px; } .void-settings .void-table table { border-collapse: collapse; } .void-settings .void-table :is(th, td) { padding: 2px 6px !important; } .void-settings .void-table :is(th, td):first-child { border-radius: 4px 0px 0px 4px; } .void-settings .void-table :is(th, td):last-child { border-radius: 0px 4px 4px 0px; } .void-settings .void-table tbody tr:hover { background-color: rgba(var(--color-foreground-blue), .7); } .void-settings .void-table input[type="color"] { border: 0; height: 24px; width: 40px; padding: 0; background-color: unset; cursor: pointer; } .void-settings .void-table button { background: unset; border: none; cursor: pointer; padding: 0; } .void-settings .void-table form { padding: 8px; display: flex; align-items: center; gap: 8px; } .void-settings .void-settings-header span { color: rgb(var(--color-blue)); } .void-settings .void-settings-list { display: flex; flex-direction: column; gap: 5px; } .void-setting-label { padding-left: 6px; vertical-align: middle; cursor: pointer; } .void-setting-label-container.void-auth-required .void-setting-label { color: rgb(var(--color-peach)); } .void-setting-label-container .void-checkbox { vertical-align: middle; } .void-checkbox { cursor: pointer; } .void-settings .void-settings-list input.void-input { width: 50px; text-align: center; height: 20px; font-size: 12px; } .void-settings .void-settings-list label { padding-left: 8px; } .void-settings .void-css-editor label { margin-top: 20px; fontSize: 2rem; display: inline-block; } .void-textarea { width: 100%; height: 300px; min-height: 200px; resize: vertical; background: rgb(var(--color-foreground-blue)); color: rgb(var(--color-text)); padding: 4px; border-radius: 4px; border: 2px solid transparent; outline: none !important; } .void-textarea:focus { border: 2px solid rgb(var(--color-blue)) !important; } .void-layout-image-container { padding: 4px; display: inline-block; } .void-layout-image-container:first-child { width: 35%; } .void-layout-image-container:last-child { width: 65%; } .void-layout-header { text-transform: uppercase; margin-top: 2.2em; margin-bottom: .8em; } .void-layout-image-display { height: 140px; background-repeat: no-repeat; margin: auto; margin-bottom: 6px; border-radius: 4px; } .void-layout-image-display.void-banner { width: 100%; background-size: cover; background-position: 50% 50%; } .void-layout-image-display.void-avatar { background-size: contain; width: 140px; } .void-layout-image-container input { width: 100%; } .void-layout-color-selection { margin-top: 10px; margin-bottom: 10px; } .void-layout-color-selection .void-color-button { width: 50px; height: 50px; display: inline-flex; border-radius: 4px; margin-right: 10px; } .void-layout-color-selection .void-color-button.active { border: 4px solid rgb(var(--color-text)); } .void-layout-color-selection .void-color-picker-container.active { border: 2px solid rgb(var(--color-text)); } .void-color-picker-container { display: inline-block; vertical-align: top; width: 75px; height: 50px; border: 2px solid transparent; border-radius: 4px; box-sizing: border-box; } .void-color-picker-container:has(:focus) { border: 2px solid rgb(var(--color-text)); } .void-color-picker-input { width: 100%; height: 20px; background-color: rgba(var(--color-background), .6); padding: 1px; font-size: 11px; color: rgb(var(--color-text)); outline: none; appearance: none; -webkit-appearance: none; text-align: center; border: unset; border-radius: 0px 0px 4px 4px; } .void-color-picker { /* width: 100%;; height: 50px; */ block-size: 30px; border-width: 0px; padding: 0px; background-color: unset; inline-size: 100%; border-radius: 4px; appearance: none; vertical-align: top; padding-block: 0px; padding-inline: 0px; outline: none; } .void-color-picker::-webkit-color-swatch, .void-color-picker::-moz-color-swatch { border: none; border-radius: 4px; } .void-color-picker::-webkit-color-swatch-wrapper, .void-color-picker::-webkit-color-swatch-wrapper { padding: 0px; border-radius: 4px; } .void-input { background-color: rgba(var(--color-background), .6); padding: 4px 6px; color: rgb(var(--color-text)); outline: none; appearance: none; -webkit-appearance: none; border: 2px solid transparent; border-radius: 4px; box-sizing: border-box; } .void-action-container { display: inline-block; width: fit-content; } .void-action-container .void-icon-button { padding: 6px 8px; margin: 0px; background: rgb(var(--color-foreground-blue-dark)); color: rgb(var(--color-text)); border-radius: 0px 4px 4px 0px; height: 100%; display: inline-flex; flex-direction: column; justify-content: center; border: 2px solid transparent; border-left: 0px !important; line-height: 1.15; box-sizing: border-box; vertical-align: top; } .void-action-container .void-icon-button:hover { color: rgb(var(--color-blue)); } .void-action-container .void-icon-button svg { height: 14px; } .void-action-container .void-input { border-radius: 4px 0px 0px 4px; } a.void-link { color: rgb(var(--color-blue)) !important; } .void-input.void-sign { width: 75px; text-align: center; height: 20px; font-size: 14px; } .void-input:focus { border: 2px solid rgb(var(--color-blue)); } .void-button { align-items: center; background: rgb(var(--color-blue)); border-radius: 4px; color: rgb(var(--color-text-bright)); cursor: pointer; display: inline-flex; font-size: 1.3rem; padding: 10px 15px; outline: none; appearance: none; -webkit-appearance: none; border: 0px solid rgb(var(--color-background)); vertical-align: top; margin-top: 15px; margin-right: 10px; } .void-icon-button { display: inline-block; cursor: pointer; margin-left: 4px; margin-right: 4px; vertical-align: middle; } .void-icon-button svg { height: 12px; vertical-align: middle; display: inline-block; pointer-events: none; } .void-range-container { display: inline-flex; } .void-range-display { margin-left: 5px; user-select: none; font-size: 14px; font-weight: bold; display: inline-flex; justify-content: center; align-items: center; min-width: 25px; } .void-gif-button svg { height: 18px; vertical-align: top; color: rgb(var(--color-red)); } .void-gif-button:hover svg { color: rgb(var(--color-blue)); } .void-gif-button { margin: 0px; } .markdown-editor[style*="display: none;"] + .void-gif-keyboard-container, .home > .activity-feed-wrap > .activity-edit:has(.markdown-editor[style*="display: none;"]) .void-activity-reply-controls-container { display: none; } .void-gif-keyboard-container { width: 100%; background: rgb(var(--color-foreground)); margin-bottom: 12px; border-radius: 4px; } .void-gif-keyboard-header { background: rgb(var(--color-foreground-grey-dark)); padding: 12px 20px; border-radius: 4px 4px 0px 0px; display: flex; justify-content: space-between; } .void-gif-keyboard-control-container { display: flex; justify-content: space-between; padding: 12px 12px 0px 12px; } .void-gif-keyboard-list-container { height: 300px; min-height: 200px; max-height: 500px; overflow-y: scroll; resize: vertical; user-select: none; } .void-gif-keyboard-list { padding: 12px 20px; width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; } .void-gif-keyboard-list-column { width: calc(100% / 3); display: flex; flex-direction: column; gap: 8px; } .void-gif-keyboard-list-placeholder { font-size: 20px; color: rgb(var(--color-text)); display: flex; height: 220px; width: 100%; justify-content: center; align-items: center; user-select: none; } .void-gif-keyboard-item img { width: 100%; background-size: contain; background-repeat: no-repeat; border-radius: 4px; cursor: pointer; display: block; } .void-gif-like-container { position: relative; width: 100%; display: inline-block; } .void-gif-like-container img { width: 100%; } .void-gif-like-container .void-gif-like { position: absolute; top: 6px; right: 6px; height: 20px; opacity: 0; transition: 0.2s ease-in all; color: rgb(var(--color-text-bright)); } .void-gif-like-container:hover .void-gif-like { opacity: 1; } .void-gif-like-container .void-gif-like svg { height: 24px; } .void-gif-like-container .void-gif-like.void-liked, .void-liked { color: rgb(var(--color-red)); } .void-hidden { display: none; } .void-pagination-container .void-icon-button.void-active, .void-pagination-container .void-icon-button:hover { color: rgb(var(--color-blue)); } .void-pagination-container .void-icon-button.void-pagination-skip { vertical-align: top; } .void-quick-access { display: flex; flex-direction: column; } .void-quick-access .void-quick-access-wrap { background: rgb(var(--color-foreground)); display: grid; grid-template-columns: repeat(auto-fill, 60px); grid-template-rows: repeat(auto-fill, 80px); gap: 15px; padding: 15px; margin-bottom: 25px; border-radius: 4px; } .void-quick-access .void-quick-access-notifications-wrapper { order: 2; margin-bottom: 25px; } .void-quick-access .void-quick-access-notifications { background: rgb(var(--color-foreground)); overflow-y: auto; max-height: 300px; scrollbar-width: thin; scrollbar-color: rgb(var(--color-blue)) rgba(0, 0, 0, 0); border-radius: 4px; transition: max-height 0.5s; } .void-notifications-config-wrapper { padding: 15px; } .void-notifications-list { padding: 15px; display: flex; flex-direction: column; gap: 8px; } .void-quick-access-notifications[collapsed="true"] { max-height: 0px; } .void-quick-access-notifications-wrapper .section-header h2 { cursor: pointer; } .void-quick-access .section-header { display: flex; justify-content: space-between; } .void-quick-access-timer { font-size: 12px; color: rgb(var(--color-text)); } .void-quick-access-item { display: inline-block; } .void-quick-access-pfp { background-size: contain; background-repeat: no-repeat; height: 60px; width: 60px; border-radius: 4px; } .void-quick-access-username { display: inline-block; text-align: center; bottom: -20px; width: 100%; word-break: break-all; font-size: 1.2rem; } .void-quick-access-badge { position: relative; } .void-quick-access-badge::after { content: "New"; background: rgb(var(--color-blue)); border: 3px solid rgb(var(--color-foreground)); border-radius: 10px; padding: 2px 4px; font-size: 9px; position: absolute; top: 2px; right: -10px; color: white; } .void-notification-wrapper { display: flex; gap: 6px; } .void-notification-wrapper .void-notification-preview { width: 30px; height: 30px; display: inline-block; background-size: contain; background-repeat: no-repeat; background-position: 50% 50%; margin-right: 6px; border-radius: 4px; position: relative; } .void-notification-wrapper .void-notification-preview.void-notification-preview-media { width: auto; height: 30px; aspect-ratio: 85 / 115; background-size: cover; } .void-notification-wrapper .void-notification-preview[data-count]::after { content: attr(data-count); background: rgb(var(--color-blue)); border: 3px solid rgb(var(--color-foreground)); border-radius: 10px; padding: 2px 4px; font-size: 9px; position: absolute; top: -6px; right: -10px; color: white; } .void-notification-preview-wrapper { position: relative; } .void-notification-preview-wrapper:hover .void-notification-group, .void-notification-group:hover { display: flex; } .void-notification-group { display: none; position: absolute; top: -30px; z-index: 20; background: rgb(var(--color-foreground)); border-radius: 4px; overflow: hidden; } .void-notification-wrapper:first-child .void-notification-group { top: unset; bottom: -30px; } .void-notification-group .void-notification-group-item { display: block; width: 30px; height: 30px; background-size: contain; background-repeat: no-repeat; background-position: 50% 50%; z-index: 20; } .void-notification-wrapper { display: flex; align-items: center; } .void-notification-wrapper .void-notification-context .void-notification-context-actor { color: rgb(var(--color-blue)); } .void-notification-context-reason { font-size: 12px; padding-top: 2px; } .void-notification-wrapper .void-notification-timestamp { font-size: 10px; margin-left: auto; align-self: start; min-width: fit-content; } .void-unread-notification { margin-left: -5px; border-left: 5px solid rgb(var(--color-blue)); } .void-notification-settings-header { margin-bottom: 8px; } .void-notification-type-list-header { font-size: 16px; margin: 8px 0 4px 0; } #void-notifications-feed-container { display: grid; grid-template-columns: fit-content(200px) auto; gap: 20px; } @media screen and (max-width: 800px) { #void-notifications-feed-container { grid-template-columns: 1fr; } } .void-notifications-feed-settings { margin-top: 25px; } .void-notifications-feed-sidebar .void-notifications-config-wrapper { padding: 0; max-height: max-content; transition: max-height 0.5s; overflow: hidden; font-size: 12px; } .void-notifications-feed-sidebar .void-notification-settings-header { cursor: pointer; user-select: none; } .void-notifications-feed-sidebar .void-notifications-config-wrapper[collapsed="true"] { max-height: 0px; } .notifications-feed.container:has(#void-notifications-feed-container) { display: block; } .void-notifications-feed-filters { display: flex; flex-direction: column; gap: 5px; } .void-notifications-feed-filter { padding: 6px 8px; border-radius: 4px; cursor: pointer; text-transform: capitalize; } .void-notifications-feed-filter.void-active, .void-notifications-feed-filter:hover { background-color: rgb(var(--color-foreground)); } .void-notifications-feed-list { display: flex; flex-direction: column; gap: 12px; } .void-notifications-feed-list .void-notification-wrapper { background: rgb(var(--color-foreground)); border-radius: 4px; padding: 8px; } .void-notifications-feed-list .void-notification-preview{ width: 50px; height: 50px; } .void-notifications-feed-list .void-notification-group-item { width: 40px; height: 40px; } .void-notifications-feed-list .void-notification-preview.void-notification-preview-media { height: 50px; } .void-notifications-feed-list .void-notification-group, .void-notifications-feed-list .void-notification-wrapper:first-child .void-notification-group { top: -40px; bottom: unset; } .void-notification-preview-relation { height: 30px; aspect-ratio: 1 / 1; background-size: cover; background-repeat: no-repeat; background-position: 50% 50%; border-radius: 4px; position: absolute; bottom: -3px; right: -3px; } .void-quick-access-notifications-wrapper .void-notification-preview-relation { height: 18px; } .void-notifications-feed-empty-notice { text-align: center; } .void-notifications-load-more-button, .void-notification-all-read-button { display: block; width: 100%; font-weight: 650; } .void-notification-dot { background:rgb(var(--color-peach)); border-radius:50%; bottom:0; color:#fff2f2; display:block; font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif; font-size:1.2rem; font-weight:500; height:20px; left:10px; line-height:20px; overflow:hidden; padding-right:1px; position:relative; text-align:center; transition:.2s; width:20px } .void-notification-dot:visited, .void-notification-dot:hover { color:#fff2f2; } .void-chip { background: rgb(var(--color-blue)); border-radius: 9999px; display: inline-block; padding: 2px 4px; font-size: 9px; color: white; margin: 0px 4px; vertical-align: top; user-select: none; } .void-loader { width: 10px; height: 10px; border-radius: 50%; display: block; margin:15px auto; position: relative; color: rgb(var(--color-blue)); left: -100px; box-sizing: border-box; animation: shadowRolling 2s linear infinite; } @keyframes shadowRolling { 0% { box-shadow: 0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0); } 12% { box-shadow: 100px 0 rgb(var(--color-blue)), 0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0); } 25% { box-shadow: 110px 0 rgb(var(--color-blue)), 100px 0 rgb(var(--color-blue)), 0px 0 rgba(255, 255, 255, 0), 0px 0 rgba(255, 255, 255, 0); } 36% { box-shadow: 120px 0 rgb(var(--color-blue)), 110px 0 rgb(var(--color-blue)), 100px 0 rgb(var(--color-blue)), 0px 0 rgba(255, 255, 255, 0); } 50% { box-shadow: 130px 0 rgb(var(--color-blue)), 120px 0 rgb(var(--color-blue)), 110px 0 rgb(var(--color-blue)), 100px 0 rgb(var(--color-blue)); } 62% { box-shadow: 200px 0 rgba(255, 255, 255, 0), 130px 0 rgb(var(--color-blue)), 120px 0 rgb(var(--color-blue)), 110px 0 rgb(var(--color-blue)); } 75% { box-shadow: 200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0), 130px 0 rgb(var(--color-blue)), 120px 0 rgb(var(--color-blue)); } 87% { box-shadow: 200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0), 130px 0 rgb(var(--color-blue)); } 100% { box-shadow: 200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0), 200px 0 rgba(255, 255, 255, 0); } } .void-notice { font-size: 11px; margin-top: 5px; } .void-select { display: inline-flex; flex-wrap: wrap; } .void-select .void-option { padding: 3px 8px; background: rgb(var(--color-foreground-blue)); font-size: 12px; cursor: pointer; user-select: none; } .void-select .void-option:hover { background: rgb(var(--color-foreground-blue-dark)); color: rgb(var(--color-text)); } .void-select .void-option:first-child { border-radius: 4px 0px 0px 4px; } .void-select .void-option:last-child { border-radius: 0px 4px 4px 0px; } .void-select .void-option.active { background: rgb(var(--color-blue)); color: rgb(var(--color-text-bright)); } .void-label-container { margin-top: 6px; margin-bottom: 6px; } .void-label-span { margin-right: 10px; min-width: 200px; display: inline-block; } .void-upload-in-progress { cursor: wait !important; } .input:has(> .void-drag-indicator) { position: relative; } .input:has(> .void-drag-indicator)::before { content: "Drop Images"; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgb(var(--color-foreground-grey)); color: rgb(var(--color-blue)); backdrop-filter: blur(2px); font-size: 20px; font-weight: 700; opacity: 0.9; display: flex; justify-content: center; align-items: center; pointer-events: none; } body:has(.void-modal-background[open]) { overflow: hidden; } .void-modal-background[open] { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999; backdrop-filter: brightness(50%); background: transparent; display: flex; justify-content: center; align-items: center; } .void-modal { background: rgb(var(--color-foreground)); color: rgb(var(--color-text)); border-radius: 4px; min-width: 500px; padding: 0; margin: 0; border-width: 0px; } .void-modal-header { width: 100%; background: rgb(var(--color-background)); padding: 12px; border-radius: 4px 4px 0px 0px; display: flex; justify-content: space-between; font-weight: 700; } .void-modal-header .void-icon-button { color: rgb(var(--color-red)); height: 20px; } .void-modal-content { padding: 12px; max-height: 500px; overflow-y: scroll; } .void-change-log-header { margin: 4px 0px; } .void-change-log-note { margin-bottom: 16px; } .void-change-log-list { list-style: none; gap: 5px; padding-left: 20px; } .void-change-log-list li:not(:last-child) { margin-bottom: 4px; } .void-change-log-list-item span:first-child { text-align: center; width: 13px; display: inline-block; } .void-change-log-list-item span:last-child { margin-left: 6px; } .void-tooltip-container:has(input) { display: inline-block; } .void-tooltip-container { position: relative; } .void-tooltip { position: absolute; text-align: center; top: -8px; left: 50%; transform: translate(-50%, -100%); font-size: 12px; padding: 4px 6px; background: rgb(var(--color-foreground-blue)); border-radius: 4px; width: max-content; max-width: 200px; visibility: hidden; z-index: 3000; } .void-tooltip-container:hover .void-tooltip { visibility: visible; } .void-tooltip-container:hover .void-tooltip:after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: rgb(var(--color-foreground-blue)) transparent transparent transparent; } .void-button.void-self-message, .void-button.void-slim { margin-top: 0; margin-right: 0; font-family: inherit; } .void-button.void-self-message { margin-left: 18px; font-weight: 900; } .activity-edit .rules-notice { display: block; } #void-toast-container { position: fixed; display: flex; flex-direction: column; gap: 10px; } #void-toast-container.void-bottom-left { bottom: 10px; left: 10px; flex-direction: column-reverse; } #void-toast-container.void-bottom-right { bottom: 10px; right: 10px; flex-direction: column-reverse; } #void-toast-container.void-top-left { top: 70px; left: 10px; } #void-toast-container.void-top-right { top: 70px; right: 10px; } .void-toast { font-size: 14px; color: rgb(var(--color-text-bright)); min-width: 150px; max-width: 300px; min-heigth: 50px; padding: 10px 8px; border-radius: 4px; } .void-info { background: rgb(var(--void-info)); } .void-success { background: rgb(var(--void-success)); } .void-error { background: rgb(var(--void-error)); } .void-warning { background: rgb(var(--void-warning)); } .void-activity-reply-controls-container { background: rgb(var(--color-foreground)); border-radius: 4px; justify-self: flex-start; margin: 10px 0px; display: flex; flex-direction: column; gap: 8px; } .void-activity-reply-controls-container[closed="true"] { display: none; } .void-media-status-controls { display: flex; gap: 10px; padding: 12px; height: 168px; } .void-media-status-controls .void-gif-keyboard-list-placeholder { height: unset; } .void-activity-reply-progress-container { display: flex; flex-direction: column; max-width: 100%; flex-shrink: 1; overflow: hidden; } .void-activity-reply-progress-container .void-media-search-title { font-size: 16px; } .void-activity-reply-progress-container .void-media-search-type { font-size: 12px; margin-top: 2px; } .void-activity-reply-progress-container .void-layout-header { margin-top: 10px; margin-bottom: 5px; } .void-reply-button-container { display: flex; justify-content: flex-end; } .void-activity-reply-toggle-button { display: flex; align-items: center; background-color: rgb(var(--color-blue)); padding: 10px 15px; border-radius: 4px; } .void-media-status-controls .void-status-poster { height: 144px; aspect-ratio: 75 / 115; object-fit: cover; } .void-activity-reply-toggle-button svg { height: 18px; } .void-activity-reply-header { width: 100%; background: rgb(var(--color-foreground-grey-dark)); display: flex; justify-content: space-between; padding: 12px; border-radius: 4px 4px 0px 0px; } .void-activity-reply-search-container { position: relative; width: fit-content; } #void-media-search-list { position: absolute; z-index: 999; background: rgb(var(--color-foreground)); border: 2px solid rgb(var(--color-blue)); border-top: 0px solid transparent; width: 100%; overflow: hidden; text-overflow: ellipsis; border-radius: 0px 0px 4px 4px; } .void-ace-editor { width: 100%; height: 600px; max-height: 800px; resize: vertical; min-height: 150px; scrollbar-color: rgb(var(--color-blue)) rgba(0, 0, 0, 0); } .void-status-poster { height: 85px; border-radius: 4px; user-select: none; } .void-media-search-result { cursor: pointer; padding: 4px 6px; display: flex; gap: 5px; text-overflow: ellipsis; align-items: center; } .void-media-search-poster { width: 30px; height: 30px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; } .void-media-search-info { max-width: calc(100% - 30px - 4px - 4px); } .void-media-search-title { font-size: 12px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .void-media-search-type { font-size: 10px; font-style: italic; } .void-media-search-result:hover { background: rgb(var(--color-foreground-grey)); } `, ""]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/runtime/api.js": /***/ ((module) => { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ module.exports = function (cssWithMappingToString) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = ""; var needLayer = typeof item[5] !== "undefined"; if (item[4]) { content += "@supports (".concat(item[4], ") {"); } if (item[2]) { content += "@media ".concat(item[2], " {"); } if (needLayer) { content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); } content += cssWithMappingToString(item); if (needLayer) { content += "}"; } if (item[2]) { content += "}"; } if (item[4]) { content += "}"; } return content; }).join(""); }; // import a list of modules into the list list.i = function i(modules, media, dedupe, supports, layer) { if (typeof modules === "string") { modules = [[null, modules, undefined]]; } var alreadyImportedModules = {}; if (dedupe) { for (var k = 0; k < this.length; k++) { var id = this[k][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _k = 0; _k < modules.length; _k++) { var item = [].concat(modules[_k]); if (dedupe && alreadyImportedModules[item[0]]) { continue; } if (typeof layer !== "undefined") { if (typeof item[5] === "undefined") { item[5] = layer; } else { item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); item[5] = layer; } } if (media) { if (!item[2]) { item[2] = media; } else { item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); item[2] = media; } } if (supports) { if (!item[4]) { item[4] = "".concat(supports); } else { item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); item[4] = supports; } } list.push(item); } }; return list; }; /***/ }), /***/ "./node_modules/css-loader/dist/runtime/noSourceMaps.js": /***/ ((module) => { module.exports = function (i) { return i[1]; }; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": /***/ ((module) => { var stylesInDOM = []; function getIndexByIdentifier(identifier) { var result = -1; for (var i = 0; i < stylesInDOM.length; i++) { if (stylesInDOM[i].identifier === identifier) { result = i; break; } } return result; } function modulesToDom(list, options) { var idCountMap = {}; var identifiers = []; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var count = idCountMap[id] || 0; var identifier = "".concat(id, " ").concat(count); idCountMap[id] = count + 1; var indexByIdentifier = getIndexByIdentifier(identifier); var obj = { css: item[1], media: item[2], sourceMap: item[3], supports: item[4], layer: item[5] }; if (indexByIdentifier !== -1) { stylesInDOM[indexByIdentifier].references++; stylesInDOM[indexByIdentifier].updater(obj); } else { var updater = addElementStyle(obj, options); options.byIndex = i; stylesInDOM.splice(i, 0, { identifier: identifier, updater: updater, references: 1 }); } identifiers.push(identifier); } return identifiers; } function addElementStyle(obj, options) { var api = options.domAPI(options); api.update(obj); var updater = function updater(newObj) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { return; } api.update(obj = newObj); } else { api.remove(); } }; return updater; } module.exports = function (list, options) { options = options || {}; list = list || []; var lastIdentifiers = modulesToDom(list, options); return function update(newList) { newList = newList || []; for (var i = 0; i < lastIdentifiers.length; i++) { var identifier = lastIdentifiers[i]; var index = getIndexByIdentifier(identifier); stylesInDOM[index].references--; } var newLastIdentifiers = modulesToDom(newList, options); for (var _i = 0; _i < lastIdentifiers.length; _i++) { var _identifier = lastIdentifiers[_i]; var _index = getIndexByIdentifier(_identifier); if (stylesInDOM[_index].references === 0) { stylesInDOM[_index].updater(); stylesInDOM.splice(_index, 1); } } lastIdentifiers = newLastIdentifiers; }; }; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js": /***/ ((module) => { var memo = {}; /* istanbul ignore next */ function getTarget(target) { if (typeof memo[target] === "undefined") { var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch (e) { // istanbul ignore next styleTarget = null; } } memo[target] = styleTarget; } return memo[target]; } /* istanbul ignore next */ function insertBySelector(insert, style) { var target = getTarget(insert); if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } target.appendChild(style); } module.exports = insertBySelector; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js": /***/ ((module) => { /* istanbul ignore next */ function insertStyleElement(options) { var element = document.createElement("style"); options.setAttributes(element, options.attributes); options.insert(element, options.options); return element; } module.exports = insertStyleElement; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js": /***/ ((module, __unused_webpack_exports, __webpack_require__) => { /* istanbul ignore next */ function setAttributesWithoutAttributes(styleElement) { var nonce = true ? __webpack_require__.nc : 0; if (nonce) { styleElement.setAttribute("nonce", nonce); } } module.exports = setAttributesWithoutAttributes; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js": /***/ ((module) => { /* istanbul ignore next */ function apply(styleElement, options, obj) { var css = ""; if (obj.supports) { css += "@supports (".concat(obj.supports, ") {"); } if (obj.media) { css += "@media ".concat(obj.media, " {"); } var needLayer = typeof obj.layer !== "undefined"; if (needLayer) { css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {"); } css += obj.css; if (needLayer) { css += "}"; } if (obj.media) { css += "}"; } if (obj.supports) { css += "}"; } var sourceMap = obj.sourceMap; if (sourceMap && typeof btoa !== "undefined") { css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); } // For old IE /* istanbul ignore if */ options.styleTagTransform(css, styleElement, options.options); } function removeStyleElement(styleElement) { // istanbul ignore if if (styleElement.parentNode === null) { return false; } styleElement.parentNode.removeChild(styleElement); } /* istanbul ignore next */ function domAPI(options) { if (typeof document === "undefined") { return { update: function update() {}, remove: function remove() {} }; } var styleElement = options.insertStyleElement(options); return { update: function update(obj) { apply(styleElement, options, obj); }, remove: function remove() { removeStyleElement(styleElement); } }; } module.exports = domAPI; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js": /***/ ((module) => { /* istanbul ignore next */ function styleTagTransform(css, styleElement) { if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css; } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild); } styleElement.appendChild(document.createTextNode(css)); } } module.exports = styleTagTransform; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ id: moduleId, /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/nonce */ /******/ (() => { /******/ __webpack_require__.nc = undefined; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { ;// CONCATENATED MODULE: ./src/assets/defaultSettings.ts const categories = { users: "users", paste: "paste", css: "css", misc: "misc", }; const defaultSettings = { copyColorFromProfile: { defaultValue: true, description: "Copy user color from their profile.", category: categories.users, }, moveSubscribeButtons: { defaultValue: false, description: "Move activity subscribe button next to comments and likes.", category: categories.misc, }, hideLikeCount: { defaultValue: false, description: "Hide activity and reply like counts.", category: categories.misc, }, enabledForUsername: { defaultValue: true, description: "Display a verified sign next to usernames.", category: categories.users, }, enabledForProfileName: { defaultValue: false, description: "Display a verified sign next to a profile name.", category: categories.users, }, defaultSign: { defaultValue: "✔", description: "The default sign displayed next to a username.", category: categories.users, }, highlightEnabled: { defaultValue: true, description: "Highlight user activity with a border.", category: categories.users, }, highlightEnabledForReplies: { defaultValue: true, description: "Highlight replies with a border.", category: categories.users, }, highlightSize: { defaultValue: "5px", description: "Width of the highlight border.", category: categories.users, }, colorUserActivity: { defaultValue: false, description: "Color user activity links with user color.", category: categories.users, }, colorUserReplies: { defaultValue: false, description: "Color user reply links with user color.", category: categories.users, }, useDefaultHighlightColor: { defaultValue: false, description: "Use fallback highlight color when user color is not specified.", category: categories.users, }, defaultHighlightColor: { defaultValue: "#FFFFFF", description: "Fallback highlight color.", category: categories.users, }, globalCssEnabled: { defaultValue: false, description: "Enable custom global CSS.", category: categories.css, }, globalCssAutoDisable: { defaultValue: true, description: "Disable global CSS when a profile has custom CSS.", category: categories.css, }, profileCssEnabled: { defaultValue: false, description: "Load user's custom CSS when viewing their profile.", category: categories.css, authRequired: true, }, activityCssEnabled: { defaultValue: false, description: "Load user's custom CSS when viewing their activity (direct link).", category: categories.css, authRequired: true, }, onlyLoadCssFromVerifiedUser: { defaultValue: false, description: "Only load custom CSS from verified users.", category: categories.css, }, layoutDesignerEnabled: { defaultValue: false, description: "Enable Layout Designer in the settings tab.", category: categories.misc, authRequired: true, }, replaceNotifications: { defaultValue: false, description: "Replace AniList notification system.", category: categories.misc, authRequired: true, }, quickAccessNotificationsEnabled: { defaultValue: false, description: "Display quick access of notifications in home page.", category: categories.misc, authRequired: true, }, quickAccessEnabled: { defaultValue: false, description: "Display quick access of users in home page.", category: categories.users, }, quickAccessBadge: { defaultValue: false, description: "Display a badge on quick access when changes are detected on user's layout.", category: categories.users, }, quickAccessTimer: { defaultValue: true, description: "Display a timer until next update of Quick Access.", category: categories.users, }, pasteEnabled: { defaultValue: false, description: "Automatically wrap pasted links and images with link and image tags.", category: categories.paste, }, pasteWrapImagesWithLink: { defaultValue: false, description: "Wrap images with a link tag.", category: categories.paste, }, pasteImageWidth: { defaultValue: "420", description: "Width used when pasting images.", category: categories.paste, }, pasteImagesToHostService: { defaultValue: false, description: "Upload image from the clipboard to image host (configure below).", category: categories.paste, }, toasterEnabled: { defaultValue: true, description: "Enable toast notifications.", category: categories.misc, }, // useElevatedFetch: { // defaultValue: false, // description: // "Query AniList API with elevated browser access (this might solve some API issues).", // category: categories.misc, // }, removeAnilistBlanks: { defaultValue: false, description: "Open AniList links in the same tab.", category: categories.misc, }, gifKeyboardEnabled: { defaultValue: false, description: "Add a GIF keyboard to activity editor.", category: categories.paste, }, gifKeyboardLikeButtonsEnabled: { defaultValue: true, description: "Add like buttons to add media to GIF keyboard.", category: categories.paste, }, changeLogEnabled: { defaultValue: true, description: "Display a changelog when a new version is detected.", category: categories.misc, }, selfMessageEnabled: { defaultValue: false, description: "Enable a self-message button on your profile (requires authentication).", category: categories.misc, authRequired: true, }, hideMessagesFromListFeed: { defaultValue: false, description: "Fix AniList bug where private messages are displayed in List activity feed.", category: categories.misc, }, csspyEnabled: { defaultValue: false, description: "Enable CSSpy in Layout & CSS tab.", category: categories.css, }, replyActivityUpdate: { defaultValue: false, description: "Add insta-reply to activity update in home feed.", category: categories.misc, authRequired: true, }, markdownHotkeys: { defaultValue: false, description: "Enable markdown editor shortcuts.", category: categories.misc, authRequired: false, }, }; ;// CONCATENATED MODULE: ./src/utils/colorFunctions.js class ColorFunctions { static hexToRgb(hex) { const r = parseInt(hex.slice(1, 3), 16); const g = parseInt(hex.slice(3, 5), 16); const b = parseInt(hex.slice(5, 7), 16); return `${r}, ${g}, ${b}`; } static rgbToHex(rgb) { const [r, g, b] = rgb.split(","); const hex = this.generateHex(r, g, b); return hex; } static generateHex(r, g, b) { return ( "#" + [r, g, b] .map((x) => { const hex = Number(x).toString(16); return hex.length === 1 ? "0" + hex : hex; }) .join("") ); } static defaultColors = [ "blue", "purple", "green", "orange", "red", "pink", "gray", ]; static defaultColorRgb = { gray: "103, 123, 148", blue: "61, 180, 242", purple: "192, 99, 255", green: "76, 202, 81", orange: "239, 136, 26", red: "225, 51, 51", pink: "252, 157, 214", }; static handleAnilistColor(color) { if (this.defaultColors.includes(color)) { return this.defaultColorRgb[color]; } return this.hexToRgb(color); } } ;// CONCATENATED MODULE: ./src/utils/DOM.js class DOM_DOM { static create(element, classes = null, children = null) { const el = document.createElement(element); if (classes !== null) { for (const className of classes?.split(" ")) { if (className.startsWith("#")) { el.setAttribute("id", `void-${className.slice(1)}`); continue; } el.classList.add(`void-${className}`); } } if (children) { if (Array.isArray(children)) { el.append(...children); } else { el.append(children); } } return el; } static render(element, parent) { const htmlElement = document.createElement(element); parent.append(htmlElement); } static renderReplace(element, parent) { const htmlElement = document.createElement(element); htmlElement.setAttribute("title", "wow"); parent.replaceChildren(htmlElement); } static getOrCreate(element, classes) { const id = classes .split(" ") .find((className) => className.startsWith("#")); return this.get(id) ?? this.create(element, classes); } static get(selector) { const convertedSelector = this.#convertSelector(selector); return document.querySelector(convertedSelector); } static getAll(selector) { const convertedSelector = this.#convertSelector(selector); return document.querySelectorAll(convertedSelector); } static #convertSelector(selector) { let results = []; for (const className of selector?.split(" ")) { if (className.startsWith("#")) { results.push(`#void-${className.slice(1)}`); continue; } results.push(`.void-${className}`); } return results.join(" "); } } ;// CONCATENATED MODULE: ./src/assets/icons.js // MIT License // Copyright (c) 2020 Refactoring UI Inc. // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. const RefreshIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const EyeIcon = () => { const icon = new DOMParser().parseFromString(` ; `, "text/html",).body.childNodes[0]; return icon; }; const EyeClosedIcon = () => { const icon = new DOMParser().parseFromString(` ; `, "text/html",).body.childNodes[0]; return icon; }; const TrashcanIcon = () => { const icon = new DOMParser().parseFromString(` ; `, "text/html",).body.childNodes[0]; return icon; }; const AddIcon = () => { const icon = new DOMParser().parseFromString(` ; `, "text/html",).body.childNodes[0]; return icon; }; const GifIcon = () => { const icon = new DOMParser().parseFromString(` ; `, "text/html",).body.childNodes[0]; return icon; }; const HeartIcon = () => { const icon = new DOMParser().parseFromString(` ; `, "text/html",).body.childNodes[0]; return icon; }; const DoubleChevronLeftIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const DoubleChevronRightIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const CloseIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const CogIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const PensilSquareIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const CheckBadgeIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const SearchDocumentIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; }; const FilmIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; } const MapIcon = () => { const icon = new DOMParser().parseFromString(` `, "text/html",).body.childNodes[0]; return icon; } ;// CONCATENATED MODULE: ./src/libraries/hotkeys.js /**! * hotkeys-js v3.13.7 * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies. * * Copyright (c) 2024 kenny wong * https://github.com/jaywcjlove/hotkeys-js.git * * @website: https://jaywcjlove.github.io/hotkeys-js * Licensed under the MIT license */ const isff = typeof navigator !== 'undefined' ? navigator.userAgent.toLowerCase().indexOf('firefox') > 0 : false; // 绑定事件 function addEvent(object, event, method, useCapture) { if (object.addEventListener) { object.addEventListener(event, method, useCapture); } else if (object.attachEvent) { object.attachEvent("on".concat(event), method); } } function removeEvent(object, event, method, useCapture) { if (object.removeEventListener) { object.removeEventListener(event, method, useCapture); } else if (object.detachEvent) { object.detachEvent("on".concat(event), method); } } // 修饰键转换成对应的键码 function getMods(modifier, key) { const mods = key.slice(0, key.length - 1); for (let i = 0; i < mods.length; i++) mods[i] = modifier[mods[i].toLowerCase()]; return mods; } // 处理传的key字符串转换成数组 function getKeys(key) { if (typeof key !== 'string') key = ''; key = key.replace(/\s/g, ''); // 匹配任何空白字符,包括空格、制表符、换页符等等 const keys = key.split(','); // 同时设置多个快捷键,以','分割 let index = keys.lastIndexOf(''); // 快捷键可能包含',',需特殊处理 for (; index >= 0;) { keys[index - 1] += ','; keys.splice(index, 1); index = keys.lastIndexOf(''); } return keys; } // 比较修饰键的数组 function compareArray(a1, a2) { const arr1 = a1.length >= a2.length ? a1 : a2; const arr2 = a1.length >= a2.length ? a2 : a1; let isIndex = true; for (let i = 0; i < arr1.length; i++) { if (arr2.indexOf(arr1[i]) === -1) isIndex = false; } return isIndex; } // Special Keys const _keyMap = { backspace: 8, '⌫': 8, tab: 9, clear: 12, enter: 13, '↩': 13, return: 13, esc: 27, escape: 27, space: 32, left: 37, up: 38, right: 39, down: 40, del: 46, delete: 46, ins: 45, insert: 45, home: 36, end: 35, pageup: 33, pagedown: 34, capslock: 20, num_0: 96, num_1: 97, num_2: 98, num_3: 99, num_4: 100, num_5: 101, num_6: 102, num_7: 103, num_8: 104, num_9: 105, num_multiply: 106, num_add: 107, num_enter: 108, num_subtract: 109, num_decimal: 110, num_divide: 111, '⇪': 20, ',': 188, '.': 190, '/': 191, '`': 192, '-': isff ? 173 : 189, '=': isff ? 61 : 187, ';': isff ? 59 : 186, '\'': 222, '[': 219, ']': 221, '\\': 220 }; // Modifier Keys const _modifier = { // shiftKey '⇧': 16, shift: 16, // altKey '⌥': 18, alt: 18, option: 18, // ctrlKey '⌃': 17, ctrl: 17, control: 17, // metaKey '⌘': 91, cmd: 91, command: 91 }; const modifierMap = { 16: 'shiftKey', 18: 'altKey', 17: 'ctrlKey', 91: 'metaKey', shiftKey: 16, ctrlKey: 17, altKey: 18, metaKey: 91 }; const _mods = { 16: false, 18: false, 17: false, 91: false }; const _handlers = {}; // F1~F12 special key for (let k = 1; k < 20; k++) { _keyMap["f".concat(k)] = 111 + k; } let _downKeys = []; // 记录摁下的绑定键 let winListendFocus = null; // window是否已经监听了focus事件 let _scope = 'all'; // 默认热键范围 const elementEventMap = new Map(); // 已绑定事件的节点记录 // 返回键码 const code = x => _keyMap[x.toLowerCase()] || _modifier[x.toLowerCase()] || x.toUpperCase().charCodeAt(0); const getKey = x => Object.keys(_keyMap).find(k => _keyMap[k] === x); const getModifier = x => Object.keys(_modifier).find(k => _modifier[k] === x); // 设置获取当前范围(默认为'所有') function setScope(scope) { _scope = scope || 'all'; } // 获取当前范围 function getScope() { return _scope || 'all'; } // 获取摁下绑定键的键值 function getPressedKeyCodes() { return _downKeys.slice(0); } function getPressedKeyString() { return _downKeys.map(c => getKey(c) || getModifier(c) || String.fromCharCode(c)); } function getAllKeyCodes() { const result = []; Object.keys(_handlers).forEach(k => { _handlers[k].forEach(_ref => { let { key, scope, mods, shortcut } = _ref; result.push({ scope, shortcut, mods, keys: key.split('+').map(v => code(v)) }); }); }); return result; } // 表单控件控件判断 返回 Boolean // hotkey is effective only when filter return true function filter(event) { const target = event.target || event.srcElement; const { tagName } = target; let flag = true; const isInput = tagName === 'INPUT' && !['checkbox', 'radio', 'range', 'button', 'file', 'reset', 'submit', 'color'].includes(target.type); // ignore: isContentEditable === 'true', and