question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Need help] Script to clean search engine result URLs

See original GitHub issue

@stoically

I need help from you. 😉 On google domains clicking external links are wrapped around https://www.google.com/url?q= on some mouse event. So when using an option to open in a new container only when domain different then link does not open in a new container (separated from google).

I guess I could overcome the problem with a Advanced -> Script where the injected script would strip https://www.google.com/url?q= at the start of destination URL. So for example https://www.google.com/url?q=https://duckduckgo.com would become request for https://duckduckgo.com and this way be opened in a new container also.

Would you be so kind to write such script, which could also be an example script usage for your Wiki?

Thank you in advance and cheers

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
crssicommented, Jul 2, 2020

I have spend all afternoon to reproduce and to be able to make STR out of it… but now it seems everything works. And the script suggested at https://github.com/stoically/temporary-containers/issues/419#issuecomment-641821628 works great… could you just correct from runAt: document_start to runAt: document_end, to avoid confusion, if someone tries to do the same. 😄

Thank you and cheers

1reaction
crssicommented, Jun 13, 2020

^^ That nailed it. 👍 Now it works. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting the URLs for the first Google search results in a shell ...
I ended up using curl's --data-urlencode option to encode the query parameter and just sed for extracting the first result. curl -s --get...
Read more >
How can you remove a URL from Google's search results?
There are a number of ways to remove or control which URLs appears on the Google SERP to avoid page duplication, keyword cannibalisation, ......
Read more >
Link Checker - Single Account | Google Ads Scripts
Link Checker addresses this problem by iterating through all of your ads, keywords, and sitelinks, checking that their URLs do not produce "Page...
Read more >
Removals and SafeSearch reports Tool - Search Console Help
The Removals tool enables you to temporarily block pages from Google Search results on sites that you own, see a history of removal...
Read more >
How to Read Website Source Code - Neil Patel
Google and other search engines “read” this code to determine where your webpages should appear in their indexes for a given search query....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found