From c4ad3a87c5ee0720e3338a9fcaf651ddf4fdfcee Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sat, 3 Dec 2022 17:41:04 +0100 Subject: [PATCH 1/9] Fix API delay not being applied correctly --- src/inject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inject.js b/src/inject.js index f6d5727..7c95754 100644 --- a/src/inject.js +++ b/src/inject.js @@ -78,7 +78,7 @@ async function makeRequest(method, url, extraheaders) { // get current date var currenttime = Date.now() var difference = currenttime - lasthomerequest - if (difference < 300) { + if (difference < apiDelay) { await new Promise(resolve => { setTimeout(function() { resolve() From 48030ead296cea11fa6656dcc00769eb5aea6d3b Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sat, 3 Dec 2022 17:55:33 +0100 Subject: [PATCH 2/9] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index acd5ad2..8ca8293 100644 --- a/README.md +++ b/README.md @@ -109,10 +109,10 @@ I included all of the default add-ons in the custom collection, so you will not 7. If the extension fails to resolve content, the affected buttons will behave like usually ## Todos / Planned features -- Add support for bookmarking, replying -- Fix last remaining resolve fails -- General performance improvements -- Improve 429 prevention and add fallbacks +- Add support for bookmarking and replying +- Fix last remaining resolve fails - not sure yet what causes them, please report fails +- General performance and code improvements +- Improve 429 prevention and add resolving fallbacks - Add support for other implementations (Plemora, GNU Social, ...) - Find additional layouts/flavours to add identifiers for - Support for profiles views with follow button disabled From a5bea05d8a01335fb314a3a782be767c68bfd8fe Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sat, 3 Dec 2022 17:56:41 +0100 Subject: [PATCH 3/9] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ca8293..e140ad7 100644 --- a/README.md +++ b/README.md @@ -120,4 +120,4 @@ I included all of the default add-ons in the custom collection, so you will not ## Thanks to... @raikasdev because I stole his fix for cross-browser storage API support -@rosemarydotworld because I customized and use his awesome jQuery.DOMNodeAppear +@rosemarydotworld because I customized and use his awesome jQuery.DOMNodeAppear where MutationObservers and delegation failed From 0a78a9c0959a5cb8860615c139b75dcf2b973a4f Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sat, 3 Dec 2022 18:09:54 +0100 Subject: [PATCH 4/9] Update todos --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e140ad7..c410c27 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,7 @@ I included all of the default add-ons in the custom collection, so you will not - Add support for other implementations (Plemora, GNU Social, ...) - Find additional layouts/flavours to add identifiers for - Support for profiles views with follow button disabled +- Implement caching where applicable to decrease required requests - If I find myself to be bored, probably more ## Thanks to... From 7e61128e5209068bad3317ea76b8a455bc48d67f Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sun, 4 Dec 2022 13:50:04 +0100 Subject: [PATCH 5/9] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c410c27..f05d798 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ A Chrome/Firefox extension that simplifies following and post interactions on ot [link-chrome]: https://chrome.google.com/webstore/detail/fedifollow/lmpcajpkjcclkjbliapfjfolocffednm 'Version published on Chrome Web Store' [link-firefox]: https://addons.mozilla.org/en-US/firefox/addon/fedifollow/ 'Version published on Mozilla Add-ons' -[Chrome][link-chrome] [][link-chrome] and other Chromium browsers (v0.8.0 in review) +[Chrome][link-chrome] [][link-chrome] and other Chromium browsers [Firefox][link-firefox] [][link-firefox] including Firefox for Android From 0c9eb199cb83e7f3cb6797a83e616424ff9cd6a7 Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sun, 4 Dec 2022 09:56:57 -0500 Subject: [PATCH 6/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f05d798..1eece68 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,7 @@ I included all of the default add-ons in the custom collection, so you will not 2. The whitelist mode can be useful if you do not want the extension to run basic checks on every site (since it needs to determine if it is a Mastodon site). Not sure if the blacklist feature is good for anything but I still included it. 3. It can have several reasons why resolving/executing actions/redirection might not work: - You are not logged in to your home instance (can't fix, log in) + - You are scrolling really fast and posts are not resolved instantly (a delay is implemented to prevent 429 API errors - wait shortly and try again) - There are instances that use custom layouts/flavours (additional identifiers need to be added to extension) - It's not a Mastodon instance (not supported yet) - Element identifiers might change over time (extension needs to be updated) From 4ba54f149a3a0654dbf84b117a2cacc7f84e0f33 Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sun, 4 Dec 2022 09:58:34 -0500 Subject: [PATCH 7/9] Update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1eece68..77b8941 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ I included all of the default add-ons in the custom collection, so you will not - Add support for bookmarking and replying - Fix last remaining resolve fails - not sure yet what causes them, please report fails - General performance and code improvements +- Update settings in content script instantly (so no page reload is needed) - Improve 429 prevention and add resolving fallbacks - Add support for other implementations (Plemora, GNU Social, ...) - Find additional layouts/flavours to add identifiers for From 98f48c7949afd7e65e71b3944dd7eeb626a45b37 Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sun, 4 Dec 2022 10:02:04 -0500 Subject: [PATCH 8/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 77b8941..5ba0548 100644 --- a/README.md +++ b/README.md @@ -122,5 +122,5 @@ I included all of the default add-ons in the custom collection, so you will not - If I find myself to be bored, probably more ## Thanks to... -@raikasdev because I stole his fix for cross-browser storage API support +@raikasdev because I stole his fix for cross-browser storage API support @rosemarydotworld because I customized and use his awesome jQuery.DOMNodeAppear where MutationObservers and delegation failed From db0db2951e07b066b8be13ba8fda5edd6116ef17 Mon Sep 17 00:00:00 2001 From: Lartsch Date: Sun, 4 Dec 2022 10:46:07 -0500 Subject: [PATCH 9/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5ba0548..0a6cb67 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ I included all of the default add-ons in the custom collection, so you will not - Add support for bookmarking and replying - Fix last remaining resolve fails - not sure yet what causes them, please report fails - General performance and code improvements +- Add indicator for content that failed to resolve - Update settings in content script instantly (so no page reload is needed) - Improve 429 prevention and add resolving fallbacks - Add support for other implementations (Plemora, GNU Social, ...)