mirror of https://github.com/gorhill/uBlock.git
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) {
|
||||
const bodyTemplate = [
|
||||
'## Address of the web page',
|
||||
'',
|
||||
'`{{url}}`',
|
||||
'',
|
||||
'## Type of issue',
|
||||
'',
|
||||
'{{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);
|
||||
const githubURL = new URL('https://github.com/uBlockOrigin/uAssets/issues/new?template=specific_report_from_ubo.yml');
|
||||
const issueType = reportSpecificFilterType();
|
||||
githubURL.searchParams.set('title', `${reportSpecificFilterHostname()}: ${issueType}`);
|
||||
githubURL.searchParams.set('url_address_of_the_web_page', '`' + reportURL.href + '`');
|
||||
githubURL.searchParams.set('category', issueType);
|
||||
githubURL.searchParams.set('configuration', configToMarkdown(false));
|
||||
vAPI.messaging.send('default', {
|
||||
what: 'gotoURL',
|
||||
details: { url: githubURL.href, select: true, index: -1 },
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<p data-i18n="supportS3P3">
|
||||
</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>
|
||||
<hr>
|
||||
|
|
Loading…
Reference in New Issue