1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-07 03:12:33 +01:00

Fine tune filter issue reporter page

Added an entry to report popups.

Added extra information about how uBO launched.
This commit is contained in:
Raymond Hill 2021-11-15 10:46:29 -05:00
parent a777ff8ff8
commit 45e5c87084
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
5 changed files with 19 additions and 4 deletions

View File

@ -960,6 +960,10 @@
"message": "Breaks when uBlock Origin is enabled", "message": "Breaks when uBlock Origin is enabled",
"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"
}, },
"supportS6Select1Option6": {
"message": "Opens unwanted tabs or windows",
"description": "An entry in the widget used to select the type of issue"
},
"supportRedact": { "supportRedact": {
"message": "Redact", "message": "Redact",
"description": "Text for 'Redact' button" "description": "Text for 'Redact' button"

View File

@ -221,6 +221,11 @@ const µBlock = { // jshint ignore:line
// This can be used to defer filtering decision-making. // This can be used to defer filtering decision-making.
readyToFilter: false, readyToFilter: false,
supportStats: {
launchToReadiness: 0,
launchFromSelfie: false,
},
pageStores: new Map(), pageStores: new Map(),
pageStoresToken: 0, pageStoresToken: 0,

View File

@ -1269,7 +1269,9 @@ const getSupportData = async function() {
if ( typeof list.entryCount === 'number' ) { if ( typeof list.entryCount === 'number' ) {
listDetails.push(`${list.entryCount}-${list.entryCount-list.entryUsedCount}`); listDetails.push(`${list.entryCount}-${list.entryCount-list.entryUsedCount}`);
} }
if ( typeof list.writeTime === 'number' ) { if ( typeof list.writeTime !== 'number' || list.writeTime === 0 ) {
listDetails.push('never');
} else {
const delta = (Date.now() - list.writeTime) / 1000 | 0; const delta = (Date.now() - list.writeTime) / 1000 | 0;
const days = (delta / 86400) | 0; const days = (delta / 86400) | 0;
const hours = (delta % 86400) / 3600 | 0; const hours = (delta % 86400) / 3600 | 0;
@ -1344,6 +1346,7 @@ const getSupportData = async function() {
), ),
modifiedUserSettings, modifiedUserSettings,
modifiedHiddenSettings, modifiedHiddenSettings,
supportStats: µb.supportStats,
}; };
}; };

View File

@ -427,6 +427,7 @@ let selfieIsValid = false;
try { try {
selfieIsValid = await µb.selfieManager.load(); selfieIsValid = await µb.selfieManager.load();
if ( selfieIsValid === true ) { if ( selfieIsValid === true ) {
µb.supportStats.launchFromSelfie = true;
ubolog(`Selfie ready ${Date.now()-vAPI.T0} ms after launch`); ubolog(`Selfie ready ${Date.now()-vAPI.T0} ms after launch`);
} }
} catch (ex) { } catch (ex) {
@ -504,7 +505,8 @@ browser.runtime.onUpdateAvailable.addListener(details => {
} }
}); });
ubolog(`All ready ${Date.now()-vAPI.T0} ms after launch`); µb.supportStats.launchToReadiness = Date.now() - vAPI.T0;
ubolog(`All ready ${µb.supportStats.launchToReadiness} ms after launch`);
// <<<<< end of private scope // <<<<< end of private scope
})(); })();

View File

@ -81,10 +81,11 @@
<select> <select>
<option value="[unknown]" data-i18n="supportS6Select1Option0" selected disabled></option> <option value="[unknown]" data-i18n="supportS6Select1Option0" selected disabled></option>
<option value="ads" data-i18n="supportS6Select1Option1"></option> <option value="ads" data-i18n="supportS6Select1Option1"></option>
<option value="nuisance" data-i18n="supportS6Select1Option2"></option>
<option value="detection" data-i18n="supportS6Select1Option3"></option> <option value="detection" data-i18n="supportS6Select1Option3"></option>
<option value="privacy" data-i18n="supportS6Select1Option4"></option> <option value="popups" data-i18n="supportS6Select1Option6"></option>
<option value="nuisance" data-i18n="supportS6Select1Option2"></option>
<option value="breakage" data-i18n="supportS6Select1Option5"></option> <option value="breakage" data-i18n="supportS6Select1Option5"></option>
<option value="privacy" data-i18n="supportS6Select1Option4"></option>
</select> </select>
</div> </div>
<div class="hasButtons"> <div class="hasButtons">