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

Not working at all on Startpage. #443

Closed
linlinxza opened this issue Apr 19, 2024 · 10 comments · Fixed by #449
Closed

Not working at all on Startpage. #443

linlinxza opened this issue Apr 19, 2024 · 10 comments · Fixed by #449
Assignees
Labels
bug Something isn't working released

Comments

@linlinxza
Copy link

linlinxza commented Apr 19, 2024

Expected Behavior

Filtering should work on startpage.

Actual Behavior

Not filtering at all.

Steps to Reproduce the Problem

1.Install addon
2. Add an expression like *://*.reddit.com/*
3. Enable for startpage.com
4. Activate
5.Search for reddit

Specifications

  • Browser: Librewolf
  • Search engine: Startpage.com
  • Language: EN
  • Region: CA

It might be worth also checking the mobile version of startpage.

@iorate iorate self-assigned this Apr 21, 2024
@iorate iorate added the bug Something isn't working label Apr 21, 2024
@linlinxza
Copy link
Author

linlinxza commented Apr 28, 2024

So, when's a new update going to be pushed for this? Because I really want to see all this junk disappear from my search results:

*://*.reddit.com/*
*://*.fb.com/*
*://*.redditinc.com/*
*://*.linkedin.com/*
*://*.threads.com/*
*://*.meta.com/*
*://*.messenger.com/*
*://*.metacareers.com/*
*://*.snapchat.com/*
*://*.apple.com/*
*://*.icloud.com/*
*://*.live.com/*
*://*.msn.com/*
*://*.microsoft.com/*
*://*.office.com/*
*://*.skype.com/*
*://*.bytedance.com/*
*://*.microsoft365.com/*
*://*.windows.com/*
*://*.hpconnected.com/*
*://*.hpsmart.com/*
*://*.samsung.com/*
*://*.canon.com/*
*://*.play.google.com/*
*://*.myspace.com/*
*://*.adobe.com/*
*://*.photoshopessentials.com/*
*://*.photoshop.com/*
*://*.bing.com/*
*://*.bingplaces.com/*
*://*.xbox.com/*
*://*.adobepress.com/*
*://*.amazon.com/*
*://*.primevideo.com/*
*://*.deviantart.com/*
*://*.deviantartsupport.com/*
*://*.deviantartsell.com/*
*://*.pinterest.com/*
*://*.tumblr.com/*
*://*.quora.com/*
*://*.visualstudio.com/*
*://*.sharepoint.com/*
*://*.facebook.com/*
*://*.twitter.com/*
*://*.instagram.com/*
*://*.tiktok.com/*
*://www.redditstatus.com/*
*://www.redditforbusiness.com/*
*://support.reddithelp.com/*
*://www.whatsapp.com/*
*://*.x.com/*
*://business.tiktokshop.com/*
*://www.onenote.com/*
*://sway.cloud.microsoft/*
*://*.amazon.ca/*
*://*.yahoo.com/*
*://www.yahooinc.com/*
*://discord.com/*
*://discordapp.com/*

@misumisumi
Copy link

I am also facing this issue and after trying to debug it I found that the class name of startpage has most likely changed.
Specifically w-gl__result no longer exists and .result exists under .w-gl.
I tried adding the following config to my entryHandler but it didn't work:

          {
            target: '.result',
            url: '.result-title',
            title: 'h2',
            actionTarget: 'a[role="link"]',
            actionStyle: {
              display: 'block',
              marginTop: '4px',
            },
          },

What's strange is that the class name set with the result class displayed in Element is different from the corresponding class name set in Sources.
This is not seen in duckduckgo, which works properly.

@linlinxza
Copy link
Author

linlinxza commented May 1, 2024

What about just use .w-gl? Or, could link-text work?

When I see something like this while inspecting, <span class="link-text">https://www.reddit.com/</span>, I suspect that could be used to filter out URLs. No? So, should the target be link-text?

@misumisumi
Copy link

At least I don't think .w-gl can be used because it is a container for the entire search result.
2024-05-02_04-21

@linlinxza
Copy link
Author

link-text?

@stevehartwell
Copy link

Thanks @misumisumi for the ideas for a solution. I've looked at it some more and am currently trying this:

    entryHandlers: [
      // Web
      {
        target: '.w-gl > .result',
        url: '.w-gl > .result .result-title',
        title: 'h2',
        actionTarget: '.w-gl > .result > .description',
        actionStyle: {
          display: 'block',
          marginTop: '4px',
        },
      },
      . . .
   ]

This seems to make filtering work (I'm not sure what actionTarget is used for). Please try this and let us know if it works for you.

However, there is still some more work to do. It seems that the headline uBlacklist has blocked 1 site and Show button are not appearing at the top of the Startpage search results.

I have tried updating the control handler target

    controlHandlers: [
      // Web
      {
        target: '.Layout #main',
        style: defaultControlStyle,
      },
      . . .
   ]

but so far this hasn't worked. I'm not sure what it's looking for.

I may keep trying, though hopefully this info so far might be enough to be helpful to @iorate 😀

@misumisumi
Copy link

misumisumi commented May 2, 2024

However, there is still some more work to do.

One of the problems is no showing Block this site, but I think this is due to the html class being changed for some reason.
For example in duckduck-go, elements and classes referenced from Element and content-script.js are the same.
image
image

But in startpage, elements and classes refferenced from element and content-script.js are not the same.
I checked with all other extensions such as adblock disabled, so I think it's a problem on the startpage side.
image
image

Probably, the behavior is to search for the entry container with target, specify the element within it with actionTarget, and add a block button with span to the specified element.

@iorate
Copy link
Owner

iorate commented May 4, 2024

@misumisumi @stevehartwell
Thank you for your investigation. I'll fix this issue soon.

Since the current version of Startpage uses React, modifications by the content script are cleaned up by the hydration process. To avoid this, the content script should be run after the page is loaded:

runAt: 'document_start',

This value should be "document_idle".

@iorate
Copy link
Owner

iorate commented May 4, 2024

Probably, the behavior is to search for the entry container with target, specify the element within it with actionTarget, and add a block button with span to the specified element.

That's true.

Copy link

github-actions bot commented May 5, 2024

🎉 This issue has been resolved in version 8.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants