@kangsicj/dcinsideenhancer 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @name DCInside Enhancer
|
|
3
3
|
// @name:ko 디시 인핸서
|
|
4
4
|
// @namespace https://github.com/kangsicj/DCInsideEnhancer
|
|
5
|
-
// @version 1.2.
|
|
5
|
+
// @version 1.2.2
|
|
6
6
|
// @description DCInside filter & enhancer — mobile & PC. Block users/words/heads/notices/images & GIFs across posts, infinite list, zoom viewer, theme sync, encrypted multi-device sync.
|
|
7
7
|
// @description:ko 디시인사이드 차단·편의 기능 (모바일·PC) - 유저·단어(제목/본문)·말머리·공지 차단, 같은/비슷한 이미지·움짤 모든 글 차단, 디시콘 제거, 차단 미디어 데이터 절약, 목록 자동 보충·무한 스크롤·뒤로 가기 위치 복원, 스크랩, 이미지 확대뷰 개선, 야간모드 자동 연동, 암호화 기기 간 동기화
|
|
8
8
|
// @author kangsicj
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @name DCInside Enhancer
|
|
3
3
|
// @name:ko 디시 인핸서
|
|
4
4
|
// @namespace https://github.com/kangsicj/DCInsideEnhancer
|
|
5
|
-
// @version 1.2.
|
|
5
|
+
// @version 1.2.2
|
|
6
6
|
// @description DCInside filter & enhancer — mobile & PC. Block users/words/heads/notices/images & GIFs across posts, infinite list, zoom viewer, theme sync, encrypted multi-device sync.
|
|
7
7
|
// @description:ko 디시인사이드 차단·편의 기능 (모바일·PC) - 유저·단어(제목/본문)·말머리·공지 차단, 같은/비슷한 이미지·움짤 모든 글 차단, 디시콘 제거, 차단 미디어 데이터 절약, 목록 자동 보충·무한 스크롤·뒤로 가기 위치 복원, 스크랩, 이미지 확대뷰 개선, 야간모드 자동 연동, 암호화 기기 간 동기화
|
|
8
8
|
// @author kangsicj
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
// 0. 설정·상수
|
|
76
76
|
// =========================================================
|
|
77
77
|
|
|
78
|
-
const SCRIPT_VERSION = '1.2.
|
|
78
|
+
const SCRIPT_VERSION = '1.2.2';
|
|
79
79
|
const PROJECT_URL = 'https://github.com/kangsicj/DCInsideEnhancer';
|
|
80
80
|
const DONATE_URL = 'https://fairy.hada.io/@jinny#support';
|
|
81
81
|
|
|
@@ -463,14 +463,31 @@
|
|
|
463
463
|
html.dc-pc-fit .dcwrap .stickyunit { display: none !important; }
|
|
464
464
|
html.dc-pc-fit .dcwrap .darkmodebox .pop_tipbox { left: auto !important; right: 0 !important; }
|
|
465
465
|
|
|
466
|
-
html.dc-pc-fit .dcwrap .cmt_info { display: flex !important; align-items: flex-start; }
|
|
467
|
-
html.dc-pc-fit .dcwrap .cmt_info::before,
|
|
468
|
-
html.dc-pc-fit .dcwrap .cmt_info::after { display: none !important; }
|
|
469
|
-
html.dc-pc-fit .dcwrap .cmt_info > .addbox { display: flex; flex: 1 1 auto; min-width: 0; width: auto !important; }
|
|
470
|
-
html.dc-pc-fit .dcwrap .cmt_info > .addbox > .cmt_nickbox { flex: 0 0 auto; float: none !important; }
|
|
471
|
-
html.dc-pc-fit .dcwrap .cmt_info > .addbox > .cmt_txtbox { flex: 1 1 auto; min-width: 0; float: none !important; width: auto !important; }
|
|
472
|
-
html.dc-pc-fit .dcwrap .cmt_info .cmt_txtbox .usertxt { float: none !important; width: auto !important; max-width: 100% !important; }
|
|
473
|
-
html.dc-pc-fit .dcwrap .cmt_info
|
|
466
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info) { display: flex !important; align-items: flex-start; }
|
|
467
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info)::before,
|
|
468
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info)::after { display: none !important; }
|
|
469
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info) > .addbox { display: flex; flex: 1 1 auto; min-width: 0; width: auto !important; }
|
|
470
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info) > .addbox > .cmt_nickbox { flex: 0 0 auto; float: none !important; }
|
|
471
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info) > .addbox > .cmt_txtbox { flex: 1 1 auto; min-width: 0; float: none !important; width: auto !important; }
|
|
472
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info) .cmt_txtbox .usertxt { float: none !important; width: auto !important; max-width: 100% !important; }
|
|
473
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info) .cmt_txtbox .comment_dccon { float: none !important; width: auto !important; max-width: 100% !important; }
|
|
474
|
+
html.dc-pc-fit .dcwrap :is(.cmt_info, .reply_info) > .fr { flex: 0 0 auto; float: none !important; margin-left: 10px; }
|
|
475
|
+
|
|
476
|
+
html.dc-pc-fit .dcwrap .writing_view_box { float: none !important; width: auto !important; }
|
|
477
|
+
html.dc-pc-fit .dcwrap .writing_view_box .write_div { width: auto !important; }
|
|
478
|
+
|
|
479
|
+
html.dc-pc-fit .dcwrap .bottom_paging_wrap {
|
|
480
|
+
display: flex !important;
|
|
481
|
+
justify-content: center;
|
|
482
|
+
align-items: center;
|
|
483
|
+
gap: 10px;
|
|
484
|
+
width: 100% !important;
|
|
485
|
+
padding-left: 0 !important;
|
|
486
|
+
padding-right: 0 !important;
|
|
487
|
+
box-sizing: border-box;
|
|
488
|
+
position: relative;
|
|
489
|
+
}
|
|
490
|
+
html.dc-pc-fit .dcwrap .bottom_paging_wrap > .bottom_paging_box { margin: 0 !important; }
|
|
474
491
|
|
|
475
492
|
html.dc-pc-fit .dcwrap .cmt_write_box > .fl { width: 142px; }
|
|
476
493
|
html.dc-pc-fit .dcwrap .cmt_write_box > .cmt_txt_cont {
|
|
@@ -14707,7 +14724,8 @@
|
|
|
14707
14724
|
|
|
14708
14725
|
// =========================================================
|
|
14709
14726
|
|
|
14710
|
-
const PREVIEW_DELAY =
|
|
14727
|
+
const PREVIEW_DELAY = 650;
|
|
14728
|
+
const PREVIEW_SWITCH_DELAY = 320;
|
|
14711
14729
|
const PREVIEW_CLOSE_DELAY = 380;
|
|
14712
14730
|
const PREVIEW_CACHE_MS = 5 * 60 * 1000;
|
|
14713
14731
|
const PREVIEW_CACHE_MAX = 30;
|
|
@@ -14755,8 +14773,11 @@
|
|
|
14755
14773
|
previewThemeObserver = null;
|
|
14756
14774
|
};
|
|
14757
14775
|
|
|
14758
|
-
const closePreview = () => {
|
|
14759
|
-
|
|
14776
|
+
const closePreview = ({ keepHover = false } = {}) => {
|
|
14777
|
+
if (!keepHover) {
|
|
14778
|
+
clearTimeout(previewHoverTimer);
|
|
14779
|
+
}
|
|
14780
|
+
|
|
14760
14781
|
clearTimeout(previewCloseTimer);
|
|
14761
14782
|
stopPreviewTheme();
|
|
14762
14783
|
|
|
@@ -14774,7 +14795,8 @@
|
|
|
14774
14795
|
|
|
14775
14796
|
const schedulePreviewClose = () => {
|
|
14776
14797
|
clearTimeout(previewCloseTimer);
|
|
14777
|
-
|
|
14798
|
+
|
|
14799
|
+
previewCloseTimer = setTimeout(() => closePreview({ keepHover: true }), PREVIEW_CLOSE_DELAY);
|
|
14778
14800
|
};
|
|
14779
14801
|
|
|
14780
14802
|
const goToPreviewPost = () => {
|
|
@@ -15203,29 +15225,72 @@
|
|
|
15203
15225
|
return;
|
|
15204
15226
|
}
|
|
15205
15227
|
|
|
15206
|
-
|
|
15207
|
-
|
|
15228
|
+
let hoverAnchor = null;
|
|
15229
|
+
let pressedAnchor = null;
|
|
15230
|
+
|
|
15231
|
+
const armHover = anchor => {
|
|
15232
|
+
clearTimeout(previewHoverTimer);
|
|
15233
|
+
|
|
15234
|
+
if (!previewEnabled() || anchor === pressedAnchor) {
|
|
15208
15235
|
return;
|
|
15209
15236
|
}
|
|
15210
15237
|
|
|
15238
|
+
const switching = previewOpen() && anchor !== previewAnchor;
|
|
15239
|
+
|
|
15240
|
+
previewHoverTimer = setTimeout(() => {
|
|
15241
|
+
if (hoverAnchor !== anchor || pressedAnchor === anchor || !anchor.isConnected) {
|
|
15242
|
+
return;
|
|
15243
|
+
}
|
|
15244
|
+
|
|
15245
|
+
clearTimeout(previewCloseTimer);
|
|
15246
|
+
showPreviewFor(anchor);
|
|
15247
|
+
}, switching ? PREVIEW_SWITCH_DELAY : PREVIEW_DELAY);
|
|
15248
|
+
};
|
|
15249
|
+
|
|
15250
|
+
document.addEventListener('mouseover', event => {
|
|
15211
15251
|
const anchor = event.target instanceof Element ? event.target.closest(PREVIEW_TITLE_SELECTOR) : null;
|
|
15212
15252
|
|
|
15213
15253
|
if (!anchor || anchor.closest('.dc-ui')) {
|
|
15214
15254
|
return;
|
|
15215
15255
|
}
|
|
15216
15256
|
|
|
15217
|
-
if (anchor ===
|
|
15257
|
+
if (anchor === hoverAnchor) {
|
|
15258
|
+
return;
|
|
15259
|
+
}
|
|
15260
|
+
|
|
15261
|
+
hoverAnchor = anchor;
|
|
15262
|
+
|
|
15263
|
+
if (anchor === previewAnchor && previewOpen()) {
|
|
15218
15264
|
clearTimeout(previewCloseTimer);
|
|
15219
15265
|
return;
|
|
15220
15266
|
}
|
|
15221
15267
|
|
|
15222
|
-
|
|
15223
|
-
previewHoverTimer = setTimeout(() => {
|
|
15268
|
+
if (previewOpen()) {
|
|
15224
15269
|
clearTimeout(previewCloseTimer);
|
|
15225
|
-
|
|
15226
|
-
|
|
15270
|
+
}
|
|
15271
|
+
|
|
15272
|
+
armHover(anchor);
|
|
15227
15273
|
});
|
|
15228
15274
|
|
|
15275
|
+
document.addEventListener('mousemove', event => {
|
|
15276
|
+
if (!hoverAnchor || previewAnchor === hoverAnchor) {
|
|
15277
|
+
return;
|
|
15278
|
+
}
|
|
15279
|
+
|
|
15280
|
+
if (event.target instanceof Node && hoverAnchor.contains(event.target)) {
|
|
15281
|
+
armHover(hoverAnchor);
|
|
15282
|
+
}
|
|
15283
|
+
}, { passive: true });
|
|
15284
|
+
|
|
15285
|
+
document.addEventListener('mousedown', event => {
|
|
15286
|
+
const anchor = event.target instanceof Element ? event.target.closest(PREVIEW_TITLE_SELECTOR) : null;
|
|
15287
|
+
|
|
15288
|
+
if (anchor) {
|
|
15289
|
+
pressedAnchor = anchor;
|
|
15290
|
+
clearTimeout(previewHoverTimer);
|
|
15291
|
+
}
|
|
15292
|
+
}, true);
|
|
15293
|
+
|
|
15229
15294
|
document.addEventListener('mouseout', event => {
|
|
15230
15295
|
const anchor = event.target instanceof Element ? event.target.closest(PREVIEW_TITLE_SELECTOR) : null;
|
|
15231
15296
|
|
|
@@ -15233,6 +15298,14 @@
|
|
|
15233
15298
|
return;
|
|
15234
15299
|
}
|
|
15235
15300
|
|
|
15301
|
+
if (hoverAnchor === anchor) {
|
|
15302
|
+
hoverAnchor = null;
|
|
15303
|
+
}
|
|
15304
|
+
|
|
15305
|
+
if (pressedAnchor === anchor) {
|
|
15306
|
+
pressedAnchor = null;
|
|
15307
|
+
}
|
|
15308
|
+
|
|
15236
15309
|
clearTimeout(previewHoverTimer);
|
|
15237
15310
|
|
|
15238
15311
|
if (previewOpen() && !(event.relatedTarget instanceof Node && previewEl.contains(event.relatedTarget))) {
|