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 userscripts support to Android version #34

Closed
2 tasks done
ameshkov opened this issue Sep 1, 2015 · 46 comments
Closed
2 tasks done

Add userscripts support to Android version #34

ameshkov opened this issue Sep 1, 2015 · 46 comments
Assignees
Milestone

Comments

@ameshkov
Copy link
Member

ameshkov commented Sep 1, 2015

  • Extensions settings UI (check how it looks like in Win version)
  • Adding/updating userscripts
@TPS
Copy link
Contributor

TPS commented Sep 2, 2015

Just to confirm, this will be userscripts subscription, not just static userscripts, right? Or both, just like user filters will be implemented?

@ameshkov
Copy link
Member Author

ameshkov commented Sep 2, 2015

No, filter subscription is different thing, it will be covered in version 2.3.

@TPS
Copy link
Contributor

TPS commented Sep 3, 2015

Nono, I mean, like the filter subscriptions that will be covered in v2.3, I'm hoping the userscripts' enhancement will include userscripts subscriptions as well, not just static userscripts.

@ameshkov
Copy link
Member Author

ameshkov commented Sep 3, 2015

Ah, got it. Yeah, there will be a possibility to add custom userscripts by url, not just use some pre-defined.

@Nick-White
Copy link

+1 I hope you will be able to specify custom userscripts from files too (not just public URLs) because I have tons of them.

@ameshkov
Copy link
Member Author

@Nick-White of course you will:)

@Bluscream
Copy link

Bluscream commented Jun 24, 2016

I totally second this, would ♥ to see it soon :)

@ameshkov ameshkov added this to the 4.0 milestone Jun 25, 2016
@TPS TPS mentioned this issue Jul 20, 2016
@Bluscream
Copy link

How far are we away from the 4.0? :'(

@ameshkov
Copy link
Member Author

ameshkov commented Nov 2, 2016

Pretty far:(

Btw, which exact userscripts do you want to have in Android?

@Bluscream
Copy link

Bluscream commented Nov 2, 2016

Mostly AAK and ads.fly bypasser and some other stuff like Github Dark Script and other userscript versions of userstyles to save my eyes when browsing the web from my tablet in my bed.

@ameshkov
Copy link
Member Author

ameshkov commented Nov 3, 2016

AAK looks abandoned, though.

@Bluscream
Copy link

It doesn't to me. Whenever i wrote a issue it was resolved within 3-4 days :)

@TPS
Copy link
Contributor

TPS commented Nov 3, 2016

@Bluscream I think that @ameshkov means that last commit was July 6, 2016. Even so, @ameshkov, this is fundamental for AAK's functionality.

Hey, @reek, are you still with us? 😟

@TPS
Copy link
Contributor

TPS commented Nov 11, 2016

@ameshkov @Bluscream @Reek's back, so this is as important as ever. 😃

@ameshkov
Copy link
Member Author

This is good news, thank you!:)

@TPS
Copy link
Contributor

TPS commented Nov 12, 2016

2 more relatively popular projects that need this are https://github.com/adsbypasser/adsbypasser & https://github.com/handyuserscripts/antiadware.

@reek
Copy link

reek commented Nov 12, 2016

Hi guys

I'm back :-)

@TPS
Copy link
Contributor

TPS commented Nov 13, 2016

Welcome back, friend! ☺

@Bluscream
Copy link

Bluscream commented Nov 13, 2016

@ameshkov give this poor guy a beta license reek/anti-adblock-killer#1883 (comment) xP

@TPS
Copy link
Contributor

TPS commented Nov 13, 2016

@ameshkov I agree w/ @Bluscream: @reek, as a maintainer of a (rather important ;) builtin list needs full access to wherever his list might be used, so ß license might useful to him across the platforms… unless @AdguardTeam would like to try to fix/workaround in-house. 😓

@Bluscream
Copy link

Bluscream commented Jan 9, 2017

Any news on this?

@TPS
Copy link
Contributor

TPS commented May 14, 2017

@jspenguin2017 Will filterset remain publicly accessible, @ least?

@jspenguin2017
Copy link

@TPS Everything will stay open source and publicly accessible, there is no worries about that 😄

@TPS
Copy link
Contributor

TPS commented May 15, 2017

Unrelated to AdBlockProtector, https://greasyfork.org/en/scripts/19993-ru-adlist-js-fixes/code (from gorhill/uBlock#2609 (comment)) seems like a fascinating thing to try, as well.

@TPS
Copy link
Contributor

TPS commented Oct 7, 2017

Just a thought: Shouldn't this also allow us to do URL conversions of other types, e.g., http://www.Amazon.com/ → https://smile.Amazon.com/ or more advanced sorcery à la HTTPS Everywhere?

@ameshkov Could #%#(function be used to effect this? Are there any docs about it &/or is this just straight (unsafe⁉️) JS?

@trmdi
Copy link

trmdi commented Oct 7, 2017

Hi, any good news about this very cool feature?

@Bluscream
Copy link

Nothing so far sadly, but the UI rehaul had priority.

@ameshkov
Copy link
Member Author

@ameshkov Could #%#(function be used to effect this? Are there any docs about it &/or is this just straight (unsafe⁉️) JS?

It is straight JS and that's why we limit those rules to AG filters only and not accept them from any third-party filters.

@ameshkov
Copy link
Member Author

Hi, any good news about this very cool feature?

Good news is that we're in process of transition to the single cross-platform filtering engine (codename CoreLibs). AG for Android v2.10 is already partly transitioned, but there's a lot more to do. Once we finish with all the products transition, they will share common functionality.

Regarding the userscripts support, it's not enough to just execute a JS script as script hosts provide an API.

Off-topic: it becomes even more complicated given the changes in userscripts API brought by Greasemonkey 4: https://www.greasespot.net/2017/09/greasemonkey-4-for-script-authors.html
Basically, he decided to implement completely new API that is not backwards-compatible.

@TPS
Copy link
Contributor

TPS commented Oct 16, 2017

@ameshkov Still, #%#(function gives us a little something to play with in the user filters while waiting.

Any1 want to join me experimenting? The example I link to above is a rough-&-dirty implementation of #1436. It exhibits some JS injection to potentially block reading a hardware sensor. 🙇

The simplest userscript I'd like is the www.Amazon.com → smile.Amazon.com conversion, but, looking through the source of several addons/extensions, they involve window.location, tab.url, or chrome.webrequest. Whaddy'all think? Could these be converted successfully?

@ameshkov
Copy link
Member Author

They're mostly Chrome extensions and not userscripts so direct conversion's not possible :(

@TPS
Copy link
Contributor

TPS commented Oct 17, 2017

Ok, how about all these? They mostly use window.location.* & location.href.*. Some of these could possibly be converted? Would any of these rewrite any initial requests before loading a Non-Smile www.Amazon page?

@ameshkov
Copy link
Member Author

@TPS something like that for instance?

amazon.com#%#if(window.location.host === 'amazon.com' || window.location.host === 'www.amazon.com') { window.location.host = 'smile.amazon.com'; }

Don't forget to enable HTTPS filtering on amazon.com

@Bluscream
Copy link

screenshot_20171022-171532

There needs to be a better way to find something here than scrolling and scrolling and scrolling

@ministr91
Copy link

какие новости?

@byaka
Copy link

byaka commented Aug 23, 2018

yep, any news about this?

@vozersky
Copy link
Member

we might think about it after we finish Core Libs integration for all the platforms

@ameshkov ameshkov added the UI label Mar 21, 2019
@ameshkov ameshkov added this to the 3.2 milestone May 13, 2019
@byaka
Copy link

byaka commented Jul 23, 2019

looks like you thinked and denied? maybe any comments?

@vbagirov
Copy link
Member

@byaka the latest AdGuard for Android beta already supports custom userscripts, soon enough it'll be added to release version.

@byaka
Copy link

byaka commented Jul 24, 2019

@vbagirov ah, awesome, thx!

@driversti
Copy link

driversti commented Aug 21, 2019

Guys, I'm so happy to get the version 3.2 this morning! This feature made my day! Thanks a lot to all of you ❤️

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