Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate API to hook into user scripts loading #242

Open
tmedwards opened this issue Jun 18, 2023 · 1 comment
Open

Investigate API to hook into user scripts loading #242

tmedwards opened this issue Jun 18, 2023 · 1 comment
Assignees
Labels
investigate Information gathering is needed

Comments

@tmedwards
Copy link
Owner

Investigate adding an API to allow hooking into the user scripts load sequence to allow custom special tags with associated behaviors.

E.g.,

_CustomTagAPI_.add('userscript', function (passage) {
	/* Process `passage` as a script. */
});
_CustomTagAPI_.add('userstyle', function (passage) {
	/* Process `passage` as a stylesheet. */
});
_CustomTagAPI_.add('something', function (passage) {
	/* Process `passage` in some way. */
});

This can already be done with JavaScript alone, so this isn't a necessity, but it might be nice to have.

@tmedwards tmedwards self-assigned this Jun 18, 2023
@tmedwards tmedwards added the investigate Information gathering is needed label Jun 18, 2023
@hituro
Copy link

hituro commented Jul 10, 2023

It would likely be cleaner than the various JS solutions if only because there are nuances to the processing of special elements (e.g. the IMG markup in stylesheets) that could otherwise be left out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Information gathering is needed
Projects
None yet
Development

No branches or pull requests

2 participants