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

Accepting PRs? #6

Open
mrwweb opened this issue Dec 11, 2024 · 0 comments
Open

Accepting PRs? #6

mrwweb opened this issue Dec 11, 2024 · 0 comments

Comments

@mrwweb
Copy link

mrwweb commented Dec 11, 2024

This is not urgent, but could be fun!

I was just toying with a little user script to wrap any planlove to me in a <mark> tag (extra relevant for me…).

I already wrote it to detect either of the planlove plugins and use the username from the localStorage:

const username = localStorage.getItem('username') ?? localStorage.getItem('plansPlusUsername');
const planText = document.querySelector('.plan_text');

if( username && planText ) {
  const findMyLove = new RegExp( `(\\[<a href="read\\.php\\?searchname=${username}" class="planlove">${username}<\\/a>\\])`, 'gi' );
  markMyLove = planText.innerHTML.replace( findMyLove, '<mark>$1</mark>' );
  planText.innerHTML = markMyLove;
}

Would this be a useful addition to PlansPlus? I'd be happy to submit it.

And if you're open to an update, we could also consider beta-testing View Transitions + the flying plan name described in grinnellplans/grinnellplans-php#304.

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

No branches or pull requests

1 participant