Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List phrases and warning in options panel #105

Merged
merged 3 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"default_title": "Just Not Sorry"
},
"options_ui": {
"page": "options/options.html",
"page": "options.html",
"chrome_style": true
},
"web_accessible_resources": [],
Expand Down
59 changes: 56 additions & 3 deletions options/options.html → options/options.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@
color: green;
height: 1.2em;
}
.warnings {
margin-top: 2em;
border: 1px solid darkgray;
border-collapse: collapse;
}
.warnings caption {
font-weight: bold;
font-size: 1.25em;
padding-bottom: 0.5em;
}
.warnings tbody td, .warnings th {
padding: 1em;
}
.warnings thead th {
background-color: #d4d4d4;
}
.warnings tbody th {
width: 10em;
text-align: left;
}
.warnings tbody tr:nth-child(even) {
background-color: #f2f2f2;
}
.warnings ul {
padding: 0;
list-style-type: none;
}
.warnings li {
margin: 0.5em 0;
}
</style>
</head>

Expand All @@ -24,8 +54,8 @@
email if you decide to ignore it.)
</p>
<p>
Created by Tami Reiss, Steve Brudz, Manish Kakwani, and Eric Tillberg of
<a href="http://defmethod.com">Def Method</a>.
Created by Tami Reiss, Steve Brudz, Manish Kakwani, and Eric Tillberg. Maintained by
<a href="https://defmethod.com">Def Method</a>.
</p>
<p>
All code has been open-sourced and is available on
Expand All @@ -47,6 +77,29 @@
<div id="status"></div>
<button id="save">Save</button>

<script src="options.js"></script>
<table class="warnings">
<caption>Words and Phrases That Trigger Warnings</caption>
<thead>
<tr>
<th>phrase</th>
<th>message</th>
</tr>
</thead>
<tbody>
<% _.forEach(allWarnings, function(warning) { %>
<tr>
<th>
<ul>
<% _.forEach(warning.keyword.split("|"), function(keyword) { %>
<li>"<%= keyword %>"</li>
<% }); %>
</ul>
</th>
<td><%= warning.message %> <a href="<%= warning.source %>" rel="noopener noreferrer" target="_blank">source</a></td>
</tr>
<% }); %>
</tbody>
</table>

</body>
</html>
Loading