mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 11:22:38 +01:00
Report specific filter issue through a template
Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/1541#issuecomment-966697347
This commit is contained in:
parent
dea7184f30
commit
e1c386515a
@ -183,36 +183,12 @@ function reportSpecificFilterType() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function reportSpecificFilterIssue(ev) {
|
function reportSpecificFilterIssue(ev) {
|
||||||
const bodyTemplate = [
|
const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new?template=specific_report_from_ubo.yml');
|
||||||
'## Address of the web page',
|
const issueType = reportSpecificFilterType();
|
||||||
'',
|
githubURL.searchParams.set('title', `${reportSpecificFilterHostname()}: ${issueType}`);
|
||||||
'`{{url}}`',
|
githubURL.searchParams.set('url_address_of_the_web_page', '`' + reportURL.href + '`');
|
||||||
'',
|
githubURL.searchParams.set('category', issueType);
|
||||||
'## Type of issue',
|
githubURL.searchParams.set('configuration', configToMarkdown(false));
|
||||||
'',
|
|
||||||
'{{type}}',
|
|
||||||
'',
|
|
||||||
'## Description (when issue is not obvious)',
|
|
||||||
'',
|
|
||||||
'[none]',
|
|
||||||
'',
|
|
||||||
'## Screenshot (when description is difficult)',
|
|
||||||
'',
|
|
||||||
'[none]',
|
|
||||||
'',
|
|
||||||
'## Configuration',
|
|
||||||
'',
|
|
||||||
'{{configuration}}',
|
|
||||||
].join('\n');
|
|
||||||
const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new');
|
|
||||||
const issueType = document.querySelector('[data-i18n="supportS6Select1"] ~ select').value;
|
|
||||||
const title = `${reportSpecificFilterHostname()}: ${reportSpecificFilterType()}`;
|
|
||||||
const body = bodyTemplate
|
|
||||||
.replace('{{url}}', reportURL.href)
|
|
||||||
.replace('{{type}}', issueType)
|
|
||||||
.replace('{{configuration}}', configToMarkdown(false));
|
|
||||||
githubURL.searchParams.set('title', title);
|
|
||||||
githubURL.searchParams.set('body', body);
|
|
||||||
vAPI.messaging.send('default', {
|
vAPI.messaging.send('default', {
|
||||||
what: 'gotoURL',
|
what: 'gotoURL',
|
||||||
details: { url: githubURL.href, select: true, index: -1 },
|
details: { url: githubURL.href, select: true, index: -1 },
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<p data-i18n="supportS3P3">
|
<p data-i18n="supportS3P3">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button id="filterReport" type="button" data-url="https://github.com/uBlockOrigin/uAssets/issues/new?template=bug_report_from_ubo.yml" data-i18n="supportOpenButton"></button>
|
<button id="filterReport" type="button" data-url="https://github.com/uBlockOrigin/uAssets/issues/new?template=report_from_ubo.yml" data-i18n="supportOpenButton"></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
Loading…
Reference in New Issue
Block a user