Add ability to label report as "nsfw"

This commit is contained in:
Raymond Hill 2021-11-16 08:11:04 -05:00
parent cf85bf1d53
commit d49b979732
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 11 additions and 1 deletions

View File

@ -964,6 +964,10 @@
"message": "Opens unwanted tabs or windows", "message": "Opens unwanted tabs or windows",
"description": "An entry in the widget used to select the type of issue" "description": "An entry in the widget used to select the type of issue"
}, },
"supportS6Checkbox1": {
"message": "Label the web page as &ldquo;NSFW&rdquo; (<a href=\"https://wikipedia.org/wiki/Not_safe_for_work\">&ldquo;Not Safe For Work&rdquo;</a>)",
"description": "A checkbox to use for NSFW sites"
},
"supportRedact": { "supportRedact": {
"message": "Redact", "message": "Redact",
"description": "Text for 'Redact' button" "description": "Text for 'Redact' button"

View File

@ -212,7 +212,11 @@ function reportSpecificFilterType() {
function reportSpecificFilterIssue(ev) { function reportSpecificFilterIssue(ev) {
const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new?template=specific_report_from_ubo.yml'); const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new?template=specific_report_from_ubo.yml');
const issueType = reportSpecificFilterType(); const issueType = reportSpecificFilterType();
githubURL.searchParams.set('title', `${reportSpecificFilterHostname()}: ${issueType}`); let title = `${reportSpecificFilterHostname()}: ${issueType}`;
if ( document.getElementById('isNSFW').checked ) {
title = `[nsfw] ${title}`;
}
githubURL.searchParams.set('title', title);
githubURL.searchParams.set('url_address_of_the_web_page', '`' + reportURL.href + '`'); githubURL.searchParams.set('url_address_of_the_web_page', '`' + reportURL.href + '`');
githubURL.searchParams.set('category', issueType); githubURL.searchParams.set('category', issueType);
githubURL.searchParams.set('configuration', configToMarkdown(false)); githubURL.searchParams.set('configuration', configToMarkdown(false));

View File

@ -87,6 +87,8 @@
<option value="breakage" data-i18n="supportS6Select1Option5"></option> <option value="breakage" data-i18n="supportS6Select1Option5"></option>
<option value="privacy" data-i18n="supportS6Select1Option4"></option> <option value="privacy" data-i18n="supportS6Select1Option4"></option>
</select> </select>
<p>
<label><span class="input checkbox"><input id="isNSFW" type="checkbox"><svg viewBox="0 0 24 24"><path d="M1.73,12.91 8.1,19.28 22.79,4.59"/></svg></span><span data-i18n="supportS6Checkbox1"></span></label>
</div> </div>
<div class="hasButtons"> <div class="hasButtons">
<button type="button" data-i18n="supportFindSpecificButton"></button> <button type="button" data-i18n="supportFindSpecificButton"></button>