-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodpulse-report.html
More file actions
106 lines (98 loc) · 2.35 KB
/
Copy pathmodpulse-report.html
File metadata and controls
106 lines (98 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html>
<head>
<title>ModPulse AI Report</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 40px;
color: #111;
line-height: 1.6;
}
.header {
border-bottom: 3px solid #111;
padding-bottom: 12px;
margin-bottom: 24px;
}
h1 {
margin: 0;
font-size: 28px;
}
h2 {
margin-top: 28px;
border-bottom: 1px solid #ccc;
padding-bottom: 6px;
}
.score {
font-size: 24px;
font-weight: bold;
color: #b00020;
}
.box {
background: #f5f5f5;
padding: 14px;
border-radius: 8px;
margin: 12px 0;
}
textarea {
width: 100%;
height: 220px;
margin-top: 10px;
font-family: monospace;
}
button {
padding: 10px 16px;
margin: 8px 8px 8px 0;
cursor: pointer;
font-weight: bold;
}
@media print {
textarea, button, .input-section {
display: none;
}
body {
margin: 24px;
}
}
</style>
</head>
<body>
<div class="header">
<h1>ModPulse AI Moderation Report</h1>
<p>PDF-ready moderation triage report for Reddit moderators.</p>
</div>
<div class="input-section">
<h2>Paste Generated Report</h2>
<p>Paste the report generated from your terminal below, then click Render Report.</p>
<textarea id="reportInput" placeholder="Paste ModPulse AI report here..."></textarea>
<br>
<button onclick="renderReport()">Render Report</button>
<button onclick="window.print()">Save as PDF</button>
</div>
<div id="reportOutput">
<h2>Report Preview</h2>
<div class="box">
Paste your ModPulse report above and click Render Report.
</div>
</div>
<script>
function escapeHtml(text) {
return text
.replace(/&/g, "&")
.replace(/</g, "<")
.replace(/>/g, ">");
}
function renderReport() {
const raw = document.getElementById("reportInput").value;
const safe = escapeHtml(raw);
const html = safe
.replace(/^# (.*)$/gm, "<h1>$1</h1>")
.replace(/^## (.*)$/gm, "<h2>$1</h2>")
.replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>")
.replace(/^- (.*)$/gm, "<li>$1</li>")
.replace(/\n/g, "<br>");
document.getElementById("reportOutput").innerHTML = html;
}
</script>
</body>
</html>