Clean Yahoo Search Links

Proposals for new surrogate scripts, updates/bug fixes to existing ones, tips and tricks to work around the lazy web.

Clean Yahoo Search Links

Postby therube » Mon Nov 23, 2015 3:25 pm

Clean Yahoo Search Links

Yahoo is the default search engine for some locals (Including en-US).

Yahoo includes "crap" in their search links.

NoScript should clean the crap on Yahoo search links as it does with Google search links?

Code: Select all
http://r.search.yahoo.com/_ylt=A0LEVy1FL1NWq5EAZANXNyoA;_ylu=X3oDMTEyOHE2OHFjBGNvbG8DYmYxBHBvcwMxBHZ0aWQDQjEyMDNfMQRzZWMDc3I-/RV=2/RE=1448320965/RO=10/RU=http%3a%2f%2fnoscript.net%2f/RK=0/RS=.2bBw9RxdvGH07giLO.4zMtYFOY-


Code: Select all
http://noscript.net/
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:42.0) Gecko/20100101 SeaMonkey/2.39
User avatar
therube
Ambassador
 
Posts: 6753
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Clean Yahoo Search Links

Postby barbaz » Mon Nov 23, 2015 5:53 pm

+1

Are all their links in that format (as in, the URL is always RU= and the parameters are always given in that format)?
*Always* check the changelogs BEFORE updating that important software!
Board search is currently partially broken: https://forums.informaction.com/viewtopic.php?f=14&t=21752
Workaround: use your favorite search engine, add site:forums.informaction.com to your query
-
barbaz
Senior Member
 
Posts: 7417
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Postby therube » Fri Dec 18, 2015 4:04 am

And now, Evil Yahoo:

Code: Select all
[NoScript InjectionChecker] JavaScript Injection in ///_ylt=A0LEVilshXNWN.gABCsnnIlQ;_ylu=X3oDMTByOHZyb21tBGNvbG8DYmYxBHBvcwMxBHZ0aWQDBHNlYwNzcg--/RV=2/RE=1450440173/RO=10/RU=http%3a%2f%2fwww.seamonkey-project.org%2f/RK=0/RS=h8X9cuGAEwMihkBKgLqrOLmfRGo-
(function anonymous() {
_ylt=A0LEVilshXNWN.gABCsnnIlQ;_ylu=X3oDMTByOHZyb21tBGNvbG8DYmYxBHBvcwMxBHZ0aWQDBHNlYwNzcg-- /* COMMENT_TERMINATOR */
DUMMY_EXPR
})

Code: Select all
[NoScript XSS] Sanitized suspicious request. Original URL [http://r.search.yahoo.com/_ylt=A0LEVilshXNWN.gABCsnnIlQ;_ylu=X3oDMTByOHZyb21tBGNvbG8DYmYxBHBvcwMxBHZ0aWQDBHNlYwNzcg--/RV=2/RE=1450440173/RO=10/RU=http%3a%2f%2fwww.seamonkey-project.org%2f/RK=0/RS=h8X9cuGAEwMihkBKgLqrOLmfRGo-] requested from [https://search.yahoo.com/yhs/search?p=seamonkey&ei=UTF-8&hspart=mozilla&hsimp=yhs-002]. Sanitized URL: [http://r.search.yahoo.com/_ylt%20A0LEVilshXNWN.gABCsnnIlQ;_ylu%20X3oDMTByOHZyb21tBGNvbG8DYmYxBHBvcwMxBHZ0aWQ20HNlYwNzcg-/RV%202/RE%201450440173/RO%2010/RU%20http://www.seamonkey-project.org//RK%200/RS%20h8X9cuGAEwMihkBKgLqrOLmfRGo-#4090625723595245600].
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39
User avatar
therube
Ambassador
 
Posts: 6753
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Clean Yahoo Search Links

Postby barbaz » Fri Dec 18, 2015 4:53 am

This work? -
noscript.surrogate.ylinks.replacement
Code: Select all
for(let a of document.querySelectorAll('a[href*="/RU="]')){a.addEventListener('mousedown',function(){if(/^https?:\/\/r\.search\.yahoo\.com/.test(a.href)){a.href=decodeURIComponent(/\/RU=([^\/]+)\//.exec(a.href)[1])}},false)}

.sources
Code: Select all
!@.yahoo.com
Last edited by barbaz on Sat Oct 14, 2017 5:44 pm, edited 1 time in total.
Reason: fix again
*Always* check the changelogs BEFORE updating that important software!
Board search is currently partially broken: https://forums.informaction.com/viewtopic.php?f=14&t=21752
Workaround: use your favorite search engine, add site:forums.informaction.com to your query
-
barbaz
Senior Member
 
Posts: 7417
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Postby therube » Sat Oct 14, 2017 3:36 am

This work? (untested)

How, where?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 Lightning/5.4
User avatar
therube
Ambassador
 
Posts: 6753
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Clean Yahoo Search Links

Postby barbaz » Sat Oct 14, 2017 4:01 am

Turns out it didn't work. Tested and fixed above.
*Always* check the changelogs BEFORE updating that important software!
Board search is currently partially broken: https://forums.informaction.com/viewtopic.php?f=14&t=21752
Workaround: use your favorite search engine, add site:forums.informaction.com to your query
-
barbaz
Senior Member
 
Posts: 7417
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Postby therube » Sat Oct 14, 2017 4:58 pm

That works, thanks :-).
Much quicker without all that nonsense.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 Lightning/5.4
User avatar
therube
Ambassador
 
Posts: 6753
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Clean Yahoo Search Links

Postby barbaz » Sat Oct 14, 2017 5:35 pm

You're welcome. Image
*Always* check the changelogs BEFORE updating that important software!
Board search is currently partially broken: https://forums.informaction.com/viewtopic.php?f=14&t=21752
Workaround: use your favorite search engine, add site:forums.informaction.com to your query
-
barbaz
Senior Member
 
Posts: 7417
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Postby barbaz » Sat Oct 14, 2017 5:37 pm

Moving to NoScript Surrogates.

I found a potential bug in the surrogate. Fixed above.
*Always* check the changelogs BEFORE updating that important software!
Board search is currently partially broken: https://forums.informaction.com/viewtopic.php?f=14&t=21752
Workaround: use your favorite search engine, add site:forums.informaction.com to your query
-
barbaz
Senior Member
 
Posts: 7417
Joined: Sat Aug 03, 2013 5:45 pm


Return to NoScript Surrogates

Who is online

Users browsing this forum: No registered users and 1 guest