Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Fix #7612: Fix issues with cosmetic filters during slow page loads #7613

Merged
merged 1 commit into from
Jun 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ window.__firefox__.execute(function($) {
}

const futureTimeMs = window.Date.now() + returnToMutationObserverIntervalMs
const queryAttrsFromDocumentBound = querySelectorsFromElement.bind(document, undefined, futureTimeMs)
const queryAttrsFromDocumentBound = querySelectorsFromElement.bind(undefined, document, futureTimeMs)
selectorsPollingIntervalId = window.setInterval(queryAttrsFromDocumentBound, selectorsPollingIntervalMs)
}

Expand Down Expand Up @@ -705,6 +705,7 @@ window.__firefox__.execute(function($) {
* @param {*} switchToMutationObserverAtTime A timestamp that identifies when we should switch to the mutation observer
*/
const querySelectorsFromElement = async (element, switchToMutationObserverAtTime) => {
extractNewSelectors(element)
const elmWithClassOrId = element.querySelectorAll('[class],[id]')

elmWithClassOrId.forEach((node) => {
Expand Down