Greasy Fork is available in English.

My Mouse Gestures

A simple mouse gesture script

< Feedback on My Mouse Gestures

Review: OK - script works, but has bugs

§
Posted: 14.03.2024

Has a very serious issue: it stores closed pages for reloading, but never prunes the list, ever! So after few years your list will grow to 10s of 1000s of records, and closing pages will become very slow. I can't believe the author didn't think about his humongous flaw in the current code logic.
To fix it, change:

let closedTabs = GM_getValue("closedTabs", []);

To:

let closedTabs = []; // keeps last tab only, in which case you could simplify code further as you don't need a list at all

Or if you want to keep say the last 10 tans (otherwise surely you'll use the Firefox history, not unclose 10+ tabs via gestures):

let closedTabs = GM_getValue("closedTabs", []).slice(-9); // keep last 9 in list and will append the closing tab = 10

Alternatively, if you don't want to change the code, periodically go in edit mode, click "values" tab and click the bin icon next to "closedTabs".

§
Posted: 22.03.2024

To keep only 1 tab and not keep/manage a list, make those 2 changes:

Gesture:

'RL': () => {
GM_openInTab(GM_getValue("closedTabs", ""), false);
}

beforeunload event listener:

window.addEventListener("beforeunload", () => {
GM_setValue("closedTabs", window.location.href);
}

I also noticed the link stored is not always working (e.g. an eBay auction saved link is not working), so you could remove this functionality altogether and use the "Undo closed tab" button from the toolbar instead, which does always work.

Peer ZengAuthor
§
Posted: 12.07.2024

Thank you very much for your feedback, this issue does exist.
In order to be as compatible with past habits as possible, I will adopt a plan to keep the last 10 browsing history.

Post reply

Sign in to post a reply.