Use a better method to skip feedback dialog

This commit is contained in:
redphx
2024-05-31 07:14:58 +07:00
parent 941ed0a00f
commit bee190b867
2 changed files with 13 additions and 7 deletions

View File

@@ -90,7 +90,6 @@ export function injectStreamMenuButtons() {
let $btnStreamSettings: HTMLElement;
let $btnStreamStats: HTMLElement;
const PREF_DISABLE_FEEDBACK_DIALOG = getPref(PrefKey.STREAM_DISABLE_FEEDBACK_DIALOG);
const observer = new MutationObserver(mutationList => {
mutationList.forEach(item => {
if (item.type !== 'childList') {
@@ -125,12 +124,6 @@ export function injectStreamMenuButtons() {
return;
}
if (PREF_DISABLE_FEEDBACK_DIALOG && $elm.className.startsWith('PostStreamFeedbackScreen')) {
const $btnClose = $elm.querySelector('button');
$btnClose && $btnClose.click();
return;
}
// Render badges
if ($elm.className?.startsWith('StreamMenu-module__container')) {
const $btnCloseHud = document.querySelector('button[class*=StreamMenu-module__backButton]');