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

Redirect badge spam and more results not working. #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ManagarmrWhisperer
Copy link
Contributor

@ManagarmrWhisperer ManagarmrWhisperer commented Jan 13, 2024

  • Verify functionality

Copy link
Collaborator

@alex4401 alex4401 left a comment

Choose a reason for hiding this comment

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

Split into two commits:

  • fix: badge spam for every replaced span in DDG
  • fix: DDG more results not working

Left change requests as well..

js/ddg.js Outdated Show resolved Hide resolved
@@ -171,15 +171,15 @@ const rewrite = {


run( wiki, linkElement ) {
if ( linkElement !== null && !this.isLocked( linkElement ) ) {
if ( linkElement !== null ) {
// Find result container
const element = linkElement.closest( 'article' );

const isTopLevel = a => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we're here, have another commit address this being a closure that's later being passed 'as' a bool. There's no reason for this to be a closure.

js/ddg.js Outdated Show resolved Hide resolved
js/ddg.js Outdated Show resolved Hide resolved
js/ddg.js Outdated Show resolved Hide resolved
js/ddg.js Outdated Show resolved Hide resolved
js/ddg.js Outdated Show resolved Hide resolved
alex4401 pushed a commit that referenced this pull request Jan 15, 2024
@alex4401
Copy link
Collaborator

Cherry-picked the redirect badge fix into master (04dd427). I'll need to take a look later at the more results patch.

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.

None yet

2 participants