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

Add option to redirect home page to archive #264

Merged
merged 1 commit into from
May 24, 2024

Conversation

SimonAlling
Copy link
Owner

@SimonAlling SimonAlling commented May 24, 2024

Some users don't like the home page because it doesn't show content in chronological order: articles from several days ago are sometimes bumped, etc. The general consensus, and explicit recommendation from SweClockers themselves, is to use the archive page instead for those who prefer chronological order.

This PR adds an option to redirect the home page to the archive and modify the internal links to the home page to point to the archive instead, as suggested by evil penguin @ SweClockers. (One might argue that the links need not be modified, since the user will be redirected anyway, but that would be slower, use more data and possibly make the home page appear more popular than it actually is.)

@SimonAlling SimonAlling merged commit e4455ab into master May 24, 2024
1 check passed
@SimonAlling SimonAlling deleted the redirect-home-page-to-archive branch May 24, 2024 17:13
SimonAlling added a commit to SimonAlling/userscripter that referenced this pull request Jul 17, 2024
I ran into a confusing problem in SimonAlling/better-sweclockers#264.
Consider an operation with this implementation:

```typescript
export default (e: {
    foo: HTMLElement,
    bar: HTMLElement,
    baz: HTMLElement,
}) => {
    for (const element of Object.values(e)) {
        console.log(element);
    }
};
```

One would expect that all three elements would be logged, but this
operation actually does nothing at all. The reason is that the
properties of `e` aren't enumerable, so `Object.values(e)` is an empty
array.

While it's easy to come up with pathological examples of operations that
will be broken by this change, it should be backward compatible for all
practical intents and purposes.

💡 `git show --color-words=.`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant