Enhances the usability and appearance of the 8chan board moderation reports page with a dynamic, compact grid layout.
目前為
// ==UserScript==
// @name 8chan Reports Page Enhancer
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Enhances the usability and appearance of the 8chan board moderation reports page with a dynamic, compact grid layout.
// @author Grok
// @match *://8chan.moe/openReports.js*
// @grant GM_addStyle
// @license MIT
// ==/UserScript==
(function() {
'use strict';
// Inject CSS styles
GM_addStyle(`
/* General Layout */
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
background-color: #f5f6f5;
color: #333;
line-height: 1.4; /* Slightly tighter line height */
margin: 0; /* Reset body margin */
font-size: 0.9em; /* Slightly smaller base font */
}
.titleWrapper {
max-width: 100%; /* Allow full width */
margin: 15px auto; /* Reduced margin */
padding: 0 10px;
box-sizing: border-box;
}
.titleFieldset {
background: #fff;
border: 1px solid #ddd;
border-radius: 6px;
padding: 15px; /* Reduced padding */
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
legend {
font-size: 1.3em; /* Smaller legend */
font-weight: 600;
color: #222;
padding: 0 8px;
}
/* Report Cells */
#reportDiv {
display: flex !important; /* Force flexbox */
flex-wrap: wrap !important;
gap: 10px; /* Reduced gap */
margin-top: 15px;
justify-content: space-between;
width: 100%; /* Ensure full container width */
box-sizing: border-box;
}
.reportCell {
background: #fff;
border: 1px solid #e0e0e0;
border-radius: 5px;
padding: 10px; /* Reduced padding */
transition: box-shadow 0.2s;
flex: 1 1 calc(50% - 8px); /* Default to 2 columns */
box-sizing: border-box;
min-width: 250px; /* Smaller minimum width */
font-size: 0.85em; /* Smaller font size for report content */
}
.reportCell:hover {
box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
.reportCell label {
display: block;
margin-bottom: 5px; /* Reduced margin */
font-size: 0.9em;
}
.boardLabel, .totalLabel, .categoryLabel, .reasonLabel {
font-weight: 500;
color: #1a73e8;
}
.reasonLabel {
background: #f1f3f4;
padding: 3px 6px; /* Smaller padding */
border-radius: 3px;
display: inline-block;
font-size: 0.9em;
}
/* Checkbox Styles */
.closureCheckbox {
margin-right: 6px;
vertical-align: middle;
width: 16px; /* Smaller checkbox */
height: 16px;
cursor: pointer;
accent-color: #1a73e8;
box-shadow: 0 0 6px rgba(26, 115, 232, 0.6);
}
.deletionCheckBox {
margin-right: 6px;
vertical-align: middle;
width: 14px; /* Smaller checkbox */
height: 14px;
cursor: pointer;
accent-color: #d32f2f;
}
.link {
color: #d32f2f;
font-weight: 500;
text-decoration: none;
padding: 3px 6px; /* Smaller padding */
border-radius: 3px;
transition: background 0.2s;
font-size: 0.9em;
}
.link:hover {
background: #ffebee;
text-decoration: none;
}
/* Post Content */
.postingDiv .innerPost {
background: #fafafa;
padding: 8px; /* Reduced padding */
border-radius: 3px;
margin-top: 8px;
font-size: 0.9em;
}
.labelBoard {
font-size: 1em; /* Smaller font */
color: #0288d1;
margin: 0 0 8px;
}
.postInfo {
font-size: 0.85em;
color: #555;
}
.labelId {
padding: 2px 5px;
border-radius: 3px;
color: #fff;
font-size: 0.85em;
}
.panelIp, .panelASN, .panelBypassId {
font-size: 0.8em;
color: #666;
margin-top: 4px;
word-break: break-all;
}
.divMessage {
margin-top: 8px;
font-size: 0.9em;
color: #333;
padding: 6px; /* Reduced padding */
background: #f5f5f5;
border-radius: 3px;
}
.quoteLink {
color: #388e3c;
text-decoration: none;
font-weight: 500;
font-size: 0.9em;
}
.quoteLink:hover {
text-decoration: underline;
}
/* Uploads */
.panelUploads {
margin-top: 8px;
}
.uploadCell {
margin-bottom: 8px;
}
.imgLink img {
border-radius: 3px;
max-width: 100px; /* Smaller thumbnail */
max-height: 100px;
height: auto;
object-fit: contain;
display: block;
}
.originalNameLink, .nameLink {
color: #0288d1;
text-decoration: none;
font-size: 0.85em;
}
.originalNameLink:hover, .nameLink:hover {
text-decoration: underline;
}
.uploadDetails, .divHash, .sizeLabel, .dimensionLabel {
font-size: 0.8em;
color: #555;
}
.unlinkLink, .unlinkAndDeleteLink {
font-size: 0.85em;
}
/* Forms */
#filterForm, form[action="/closeReports.js"] {
background: #f9f9f9;
padding: 10px; /* Reduced padding */
border-radius: 5px;
margin-bottom: 15px;
}
#filterForm label, form[action="/closeReports.js"] label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: #444;
font-size: 0.9em;
}
#filterCategoriesDiv {
margin: 8px 0;
}
.categoryCheckbox {
margin-right: 6px;
width: 14px;
height: 14px;
}
input[type="text"], select {
padding: 6px; /* Smaller padding */
border: 1px solid #ccc;
border-radius: 3px;
font-size: 0.9em;
width: 180px; /* Slightly smaller */
margin-left: 8px;
}
input[type="text"]:focus, select:focus {
border-color: #1a73e8;
outline: none;
box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}
button, #filterSubmitButton, #closeReportsFormButton {
background: #1a73e8;
color: #fff;
border: none;
padding: 6px 12px; /* Smaller padding */
border-radius: 3px;
font-size: 0.9em;
cursor: pointer;
transition: background 0.2s;
}
button:hover, #filterSubmitButton:hover, #closeReportsFormButton:hover {
background: #1565c0;
}
/* Checkboxes */
.closeReportsField {
margin-right: 6px;
vertical-align: middle;
width: 14px;
height: 14px;
}
/* Navigation */
.navHeader {
background: #fff;
border-bottom: 1px solid #ddd;
padding: 8px 15px; /* Reduced padding */
position: sticky;
top: 0;
z-index: 1000;
}
.navLinkSpan a {
color: #0288d1;
text-decoration: none;
margin: 0 4px;
font-size: 0.9em;
}
.navLinkSpan a:hover {
text-decoration: underline;
}
/* Responsive Adjustments for More Columns */
@media (min-width: 900px) {
.reportCell {
flex: 1 1 calc(33.33% - 8px); /* 3 columns */
}
}
@media (min-width: 1200px) {
.reportCell {
flex: 1 1 calc(25% - 8px); /* 4 columns */
}
}
@media (max-width: 600px) {
.reportCell {
flex: 1 1 100% !important; /* Single column on small screens */
min-width: 100% !important;
max-width: 100% !important;
}
input[type="text"], select {
width: 100%;
}
}
`);
})();