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

Add new scriptlet — 'remove-node-text' #318

Closed
Yuki2718 opened this issue May 25, 2023 · 4 comments
Closed

Add new scriptlet — 'remove-node-text' #318

Yuki2718 opened this issue May 25, 2023 · 4 comments

Comments

@Yuki2718
Copy link

Yuki2718 commented May 25, 2023

gorhill/uBlock@2bb4467
It's not a trusted scriptlet. We already have several rules to remove node text, e.g. in Japanese filters

jisakuhibi.jp#%#AG_onLoad(function() { var el = document.querySelector('.article-body'); if(el) { el.innerHTML = el.innerHTML.replace(/スポンサードリンク/g,''); } });
rank1-media.com#%#AG_onLoad(function() { document.body.innerHTML = document.body.innerHTML.replace(/スポンサードリンク/g, ""); });
2ch.pet#%#AG_onLoad(function() { document.body.innerHTML = document.body.innerHTML.replace(/広告/g, ""); });

It will be nice to have the scriptlet and replace these rules with it, also for similar cases in future.

@ameshkov
Copy link
Member

Good idea!

@Alex-302
Copy link
Member

@ameshkov Maybe better replace ?

@Yuki2718
Copy link
Author

Maybe better replace ?

uBO first introduced that which is a trusted scriptlet. The point of remove-node-text is it's not trusted one.

@Alex-302
Copy link
Member

Common version can be made from a more powerful.

@adguard-bot adguard-bot changed the title Add uBO scriptlet remove-node-text Add new scriptlet — 'remove-node-text' May 31, 2023
slavaleleka referenced this issue Jun 6, 2023
…ext scriptlets

Merge in ADGUARD-FILTERS/scriptlets from feature/AG-22599 to master

Squashed commit of the following:

commit ade2cfe
Author: Stanislav A <[email protected]>
Date:   Mon Jun 5 20:51:29 2023 +0300

    revert md changes

commit 2868468
Merge: b7d95b3 8477e52
Author: Stanislav A <[email protected]>
Date:   Mon Jun 5 20:48:09 2023 +0300

    Merge branch 'feature/AG-22599' of ssh://bit.adguard.com:7999/adguard-filters/scriptlets into feature/AG-22599

commit b7d95b3
Author: Stanislav A <[email protected]>
Date:   Mon Jun 5 20:47:58 2023 +0300

    revert md changes

commit 8477e52
Author: Stanislav A <[email protected]>
Date:   Mon Jun 5 16:24:33 2023 +0300

    lint markdown

commit 09ac355
Author: Slava Leleka <[email protected]>
Date:   Mon Jun 5 15:32:46 2023 +0300

    revert yarn.lock

commit 4ff68b4
Author: Slava Leleka <[email protected]>
Date:   Mon Jun 5 12:45:16 2023 +0300

    update markdownlintignore

commit 381195f
Merge: e97f837 d1f399c
Author: Slava Leleka <[email protected]>
Date:   Mon Jun 5 12:43:41 2023 +0300

    Merge branch 'master' into feature/AG-22599

commit e97f837
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 19:12:32 2023 +0300

    revert tweaks

commit 500cebf
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 17:05:53 2023 +0300

    tweak test

commit eae25fb
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 16:45:13 2023 +0300

    tweak test

commit 799d068
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 16:23:33 2023 +0300

    tweak test

commit b891f5e
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 15:17:16 2023 +0300

    tweak test

commit e8d4d1d
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 14:37:40 2023 +0300

    tweak test

commit d6fb2c0
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 14:18:49 2023 +0300

    tweak test

commit 9b2537c
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 13:57:26 2023 +0300

    add trusted-replace-node-text test to index

commit 4589226
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 13:27:31 2023 +0300

    Revert "comment out node-text tests"

    This reverts commit 61ca41c.

commit 61ca41c
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 13:16:38 2023 +0300

    comment out node-text tests

commit 93b1093
Author: Stanislav A <[email protected]>
Date:   Fri Jun 2 11:27:15 2023 +0300

    improve ubo params parsing

commit bc622b9
Author: Stanislav A <[email protected]>
Date:   Thu Jun 1 17:51:21 2023 +0300

    add wiki to markdownlintignore

commit f0f69d9
Author: Stanislav A <[email protected]>
Date:   Thu Jun 1 17:22:42 2023 +0300

    update yarn.lock, imporve namings, fix observe helper

... and 19 more commits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants