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

Lint #6555

Merged
merged 9 commits into from Apr 25, 2023
Merged

Lint #6555

merged 9 commits into from Apr 25, 2023

Conversation

fregante
Copy link
Member

No description provided.

@@ -10,7 +10,6 @@ import onAbort from './helpers/abort-controller';
import ArrayMap from './helpers/map-of-arrays';
import bisectFeatures from './helpers/bisect';
import {shouldFeatureRun} from './github-helpers';
import polyfillTurboEvents from './github-helpers/turbo-events-polyfill';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PJAX is old news

@@ -38,12 +38,12 @@ function initRepoList(signal: AbortSignal): void {
}

void features.add(import.meta.url, {
include: [
pageDetect.hasRepoHeader,
],
asLongAs: [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asLongAs must be first

@@ -55,5 +57,5 @@ export default function observe<
signal?.addEventListener('abort', () => {
rule.remove();
});
window.addEventListener('animationstart', getListener(seenMark, selector, listener), {signal});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lets us listen to the feature unload inside the observer’s callback:

function add(element, {signal}) {
	wrap(element, <strong/>)
	signal.addEventListener('abort', () => {
		element.remove();
	});
}

function init(signal) {
	observe('a', add, {signal})
}

Mentioned in:

@fregante fregante added the meta Related to Refined GitHub itself label Apr 25, 2023
@fregante fregante marked this pull request as ready for review April 25, 2023 17:29
@fregante fregante merged commit 98fb24e into main Apr 25, 2023
9 checks passed
@fregante fregante deleted the lint20111 branch April 25, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Related to Refined GitHub itself
Development

Successfully merging this pull request may close these issues.

None yet

1 participant