Skip to content

(GitHub Collapse Markdown) fix for no longer working in Greasemonkey #13

@darkred

Description

@darkred

The following is a Firefox/Greasemonkey-only issue:
in Chrome 53/Tampermonkey 4.1.10 the issue doesn't occur.

Using GCM v1.1.3 with GM 3.9 in FF 49 (win 10 x64).

The script was no longer collapsing Markdown in any GitHub page.
To make sure I tried in a fresh FF profile with only GM installed and the script
and opened as a reference https://github.com/sinatra/sinatra
(i.e. is the page that you used in the screen capture) :
no content was collapsed.

I was getting

missing = in const declaration GitHub_Collapse_Markdown.user.js:233:13 

in Browser Console.

So, changing lines 233 and 240
from
for (const el of els) {
to
for (let el of els) {
fixes the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions