AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
148 stars 29 forks source link

Add a scriptlet that cleans up 'location.hash' #135

Open ameshkov opened 3 years ago

ameshkov commented 3 years ago

location.hash is the part of an URL that comes after #. For instance, https://example.org/#heregoeshash. Doc: https://developer.mozilla.org/en-US/docs/Web/API/Location/hash

This script would nicely pair with $removeparam that currently does not handle location.hash.

@AdguardTeam/filters-maintainers what we need before implementing this are examples of tracking parameters that use location.hash.

RalMay commented 3 years ago

as requested a RL example:

www.tagesspiegel.de/politik/wissenschaftlerin-wirft-deutschland-versagen-vor-warnsystem-soll-hochwasser-praezise-vorhergesagt-haben/27433034.html#click=https://t.co/x83AmUn62t

P.S. I'll add links to Tweets as soon as I find some.

slavaleleka commented 3 years ago

one more real-life example:

https://www.sportmaster.ru/product/10638517/?icid=catalog/aksessuary/ryukzaki_i_sumki/ryukzaki/|sort_DN|10638517#http://recs.richrelevance.com/rrserver/apiclick?a=1b3ec00b69aa8a3c&cak=dd7046b11b172a92&channelId=dd7046b11b172a92&vg=9c836473-7fd6-4bc6-6073-d95ee8b177b6&stid=276300&pti=4&pa=23034&pos=68&p=10638517&s=631194771ad930a87eadadf393e98209&u=&rid=bb035cc3-1dc2-4627-9d25-a1bf2d4b936b&qsgs=4843&mvtId=-1&mvtTs=1630523531980
peace2000 commented 3 years ago

Samples:

https://www.iltalehti.fi/kotimaa/a/eaf9351b-5db7-4a09-9aec-698fc58dede7?utm_medium=Social&utm_source=Facebook#Echobox=1631972917

https://www.mikrobitti.fi/uutiset/mb/939999ef-8cd1-4460-a6b3-6903aa37c787?utm_term=Autofeed&utm_medium=Social&utm_source=Facebook#Echobox=1631848038

https://www.mtvuutiset.fi/artikkeli/eduskuntatalon-edessa-koronarajoituksia-vastustava-mielenilmaus-katso-kuvat-paikan-paalta/8238332#gs.bmwx9z

https://www.mtvuutiset.fi/artikkeli/huumeongelman-hoitoon-auttaisi-jos-kannabiksen-kaytosta-ei-rangaistaisi-terveysasiantuntijat-arvioivat-ihmiset-piilottelevat-kayttoa-viimeiseen-asti/8234692#gs.aqx9qt

https://www.verkkouutiset.fi/asiantuntija-ranska-pitaa-nato-kumppaneidensa-toimintaa-petoksena/#5d8ce337

https://www.liikenneturva.fi/fi/ajankohtaista/tiedote/lasten-osallisuus-esille-valtakunnallisella-liikenneturvallisuusviikolla#a26f7061

ameshkov commented 3 years ago

A couple more examples: • https://www.verkkouutiset.fi/asiantuntija-ranska-pitaa-nato-kumppaneidensa-toimintaa-petoksena/#5d8ce337https://www.amazon.com/Clues-Disney-Fairies-Stepping-Stone/dp/0736426590/ref=sr_1_3

The second one is not a location hash though.

peace2000 commented 3 years ago

That verkkouutiset.fi is a duplicate of link I posted yesterday.

ameshkov commented 3 years ago

Oh, indeed

peace2000 commented 2 years ago

https://www.mytrendyphone.fi/shop/adata-premier-microsdxc-226722p.html#tabXOzTT6p

liamengland1 commented 2 years ago

somewhat related: https://github.com/uBlockOrigin/uBlock-issues/issues/1014

ameshkov commented 2 years ago

One more example: https://t.me/adguard_en/150709

Alex-302 commented 2 years ago

Another example

https://www.zalando.fi/faq/Palautus-and-Hyvitys/Usean-tilauksen-palauttaminen-samassa-paketissa.html?wmc=CRM358_TMS_FI.ONL_MIX_NMT_TM732%22709)194178%&cd084=bundling_faq%20&cd085=47A44Ze6,Y31S#31x0&H89q%3EYj1u90265501&wt_cd=w5gXXv4N14v408Fpt7uM8X3Fu16q4x80&tm_hem=o3P36z62253O1M66813Bi8mK336ym10Z

Not sure what the purpose of # here, but these rules do no remove parameters

||zalando.fi^$removeparam=wt_cd
||zalando.fi^$removeparam=tm_hem

If # replaced by ?, all parameters can be removed by the rules.

Alex-302 commented 8 months ago

Another example https://github.com/AdguardTeam/tsurlfilter/issues/117