Skip to content

UTF8 byte-order-mark at beginning of files #135

Description

@The-Compiler

At least Github_Pull_Request_From.user.js (but probably others as well) does have a UTF-8 BOM.

This does violate what's documented in the Greasemonkey wiki:

Note that the opening // ==UserScript== and closing // ==/UserScript== must be precisely at the beginning of its line.

since the file starts with 0xEF, 0xBB, 0xBF before the // ==UserScript==.

This causes it to not work properly in qutebrowser. I'll fix this there as well (by stripping it), but it might affect other Greasemonkey implementations as well.

Assuming you're on Unix, you should be able to remove them all using:

$ find . -name '*.js' -exec sed -i $'1s/^\uFEFF//' {} \;

Alternatively (if your editor inserts them), I guess it'd be possible to move the // ==UserScript== line to the second line.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions