Skip to content

[Feature] Multiple 'js_vars' hook support #7450

@hkcomori

Description

@hkcomori

Is your feature request related to a problem? Please describe.

The js_vars was added by #3342 for the purpose of passing variables from PHP to JavaScript in extensions.
However, if multiple extensions use js_vars, only the last js_vars will work.

Use case

If Copy2Clipboard and ReadingTime#300 are enabled at the same time,
one of them will not work properly.

Describe the solution you’d like

Change signature of js_vars to PassArguments.
In addition, make sure that PassArguments returns a return value.

Describe alternatives you’ve considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions