Compare commits

..

No commits in common. "c98ca80bbfc0d58f544a1fa8ff7db28b50f9897d" and "2ecd4edcb7df6c145f896a73f53d5dabb3a2e531" have entirely different histories.

3 changed files with 13 additions and 23 deletions

View File

@ -166,30 +166,20 @@ function restoreScrollability() {
*/
function startConstantVigilance() {
// console.log("startConstantVigilance");
var observer;
var starter = function() {
observer.observe(document.querySelector("html"), {
attributes: true,
childList: true,
subtree: true
});
};
observer = new MutationObserver((mutationsList, observer) => {
// Workaround for Firefox performance bug. Firefox does not properly
// coalesce mutations into the mutationsList, instead calling the
// callback potentially thousands of times. Therefore we must
// disconnect the observer, wait for the main thread to become idle,
// and then restart it.
observer.disconnect();
var observer = new MutationObserver((mutationsList, observer) => {
window.requestIdleCallback(() => {
killSticky();
starter();
}, {timeout: 1000});
for (var mutation of mutationsList) {
killSticky(mutation.target);
}
});
});
console.log("Commencing vigilance for stickies!");
starter();
observer.observe(document.querySelector("html"), {
attributes: true,
childList: true,
subtree: true
});
}
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
@ -202,7 +192,7 @@ function beginKillingStickies() {
window.requestIdleCallback(() => {
killSticky();
startConstantVigilance();
}, {timeout: 1000});
});
}
/******************/

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "AlwaysKillSticky",
"version": "1.3.1",
"version": "1.3.0",
"description": "Get rid of sticky elements on websites - permanently!",
"author": "Said Achmiz",
"homepage_url": "https://git.sr.ht/~achmizs/AlwaysKillSticky.git",

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "AlwaysKillSticky",
"version": "1.3.1",
"version": "1.3.0",
"description": "Get rid of sticky elements on websites - permanently!",
"author": "Said Achmiz",
"browser_specific_settings": {