UserScripts icon indicating copy to clipboard operation
UserScripts copied to clipboard

(Github News Feed Filter) the `Actions` list is no longer populated (`Uncaught TypeError: Array.forEach is not a function` error)

Open darkred opened this issue 4 years ago • 4 comments

Greetings

It's about the 'Github News Feed Filter' script.

I've just noticed that the Actions list is no longer populated, I'm getting this error twice instead:

Uncaught TypeError: Array.forEach is not a function     line 476
    at HTMLAnchorElement.filterTabInnerClick 

This must have happened due to the recent GitHub HTML changes.

By the way, I've noticed that, clicking to switch to either the Repositories or Users tabs causes the sidebar to become too thin in width. (this is an irrelevant issue that's been happening a long time now)

Here is a screen capture (TM in Chrome) to see what I mean:

screen capture

Tested v8.2.8 with fresh profile of both Chrome 89/Firefox 87 using latest Tampermonkey beta 4.12.6132/Violentmonkey beta 2.12.11.2 .

I tried, but can't seem to be able to fix it myself.

Thank you

darkred avatar Apr 03 '21 22:04 darkred

Hi @darkred, is this still an issue?

Because it's working for me, even after loading more news...

jerone avatar Apr 07 '21 10:04 jerone

Thank you for responding.

Yes, it is still occurs.

I found what's happening: if you install the script in a fresh Chrome/Firefox profile with TM/VM, it doesn't work at all (=the Actions tab is empty + switching to the other two makes the sidebar thin). If you restore it -in TM only- using the following TM zip backup (just this 1 script) from my everyday Chrome profile, the script works partially (=the Actions tab works ok, but switching to either of the other two tabs, makes the sidebar thin)


To reproduce yourself:

  • create a fresh Chrome profile with just Tampermonkey (stable/beta)

  • import the script in TM using this TM zip backup from my everyday profile: tampermonkey-backup-chrome-2021-04-07T12-11-38-615Z.zip The zip contains only the following:

    Github News Feed Filter.options.json
    Github News Feed Filter.storage.json
    Github News Feed Filter.user.js
    

    Their content:

    Github News Feed Filter.options.json
    {"options":{"check_for_updates":true,"comment":null,"compat_foreach":false,"compat_metadata":false,"compat_prototypes":true,"compat_wrappedjsobject":false,"compatopts_for_requires":true,"noframes":null,"override":{"merge_connects":true,"merge_excludes":true,"merge_includes":true,"merge_matches":true,"orig_excludes":[],"orig_includes":["https://github.com/","https://github.com/?*","https://github.com/orgs/*/dashboard","https://github.com/orgs/*/dashboard?*"],"orig_matches":[],"orig_noframes":null,"orig_run_at":"document-idle","use_blockers":[],"use_connects":[],"use_excludes":[],"use_includes":[],"use_matches":[]},"run_at":null},"settings":{"enabled":true,"position":1},"meta":{"name":"Github News Feed Filter","uuid":"ba9ea9bd-2eca-4919-a0c2-96b4c915eec2","modified":1556138108004,"file_url":"https://greasyfork.org/scripts/171-github-news-feed-filter/code/Github%20News%20Feed%20Filter.user.js"}}
    
    Github News Feed Filter.storage.json
    {"ts":1617797431611,"data":{}}
    
  • load https://github.com/ , you'll see that the script works partially (just its 1st tab, Actions ).

  • now open the script in TM's editor and click Developer|Factory Reset, in order to remove all its data, as if you've just installed it

  • reload https://github.com, you'll notice that the script doesn't work anymore.

darkred avatar Apr 07 '21 12:04 darkred

To summarize:

  • in a fresh Chrome/FF profile the script doesn't work at all:
    • the 'Actions' tab remains empty,
    • switching to either tab, makes the sidebar thin
  • in my everyday profile (or in a fresh profile, restoring the script from the zip above) it works partially:
    • the 'Actions' tab works ok, but
    • switching to either tab, makes the sidebar thin

Note: in the latter case, if I enable the 'Refined GitHub' extension, then, although the Actions list gets populated, clicking on any filter hides ALL entries, matching or not.

darkred avatar Apr 08 '21 16:04 darkred

@jerone The script's basic functionality is now built-in (currently beta), see https://github.blog/changelog/2022-06-14-updates-to-github-feed-public-beta/

Screenshot:

Your script is much more powerful of course, and offers various custom filtering options, but maybe it's better to just deprecate/archive the script? There have been so many changes in the news feed, incl. that it's even now split to two: "Following" and "For Your". I think it might not be worth the trouble to try to update the script for the new layout.

darkred avatar Jun 15 '22 16:06 darkred