Clean Yahoo Search Links

Proposals for new surrogate scripts, updates/bug fixes to existing ones, tips and tricks to work around the lazy web.
Post Reply
User avatar
therube
Ambassador
Posts: 7922
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Clean Yahoo Search Links

Post by therube »

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
barbaz
Senior Member
Posts: 10834
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Post by barbaz »

+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!
-
User avatar
therube
Ambassador
Posts: 7922
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Clean Yahoo Search Links

Post by therube »

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
barbaz
Senior Member
Posts: 10834
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Post by barbaz »

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!
-
User avatar
therube
Ambassador
Posts: 7922
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Clean Yahoo Search Links

Post by therube »

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
barbaz
Senior Member
Posts: 10834
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Post by barbaz »

Turns out it didn't work. Tested and fixed above.
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
therube
Ambassador
Posts: 7922
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Clean Yahoo Search Links

Post by therube »

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
barbaz
Senior Member
Posts: 10834
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Post by barbaz »

You're welcome. Image
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 10834
Joined: Sat Aug 03, 2013 5:45 pm

Re: Clean Yahoo Search Links

Post by barbaz »

Moving to NoScript Surrogates.

I found a potential bug in the surrogate. Fixed above.
*Always* check the changelogs BEFORE updating that important software!
-
Post Reply