Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I inject Javascript code into Chrome Custom Tabs

Tags:

In my app, I am currently using a web view to display some content. Then, I use Javascript injection to quickly fill out the form for the user.

The only issue is, Webviews are incredibly slow compared to Chrome Custom tabs. Is it possible to inject Javascript code into these custom tabs?

For example, here is some code I currently use:

myWebView.loadUrl("javascript:document.getElementById('join_first_name').value='" + name + "';void(0); "); 
like image 793
alex23434 Avatar asked Jan 11 '16 22:01

alex23434


People also ask

How do I use custom Tabs in Tabs?

From the main menu, select Custom Content and then the Factions tab at the top. Add the unit to a new or existing faction. Pick a faction, then select the Downloaded tab to add units you've subscribed to in the workshop.


1 Answers

No; that would be a critical security hole.

Since custom tabs use cookies, settings, and password managers from the user's real Chrome instance, you cannot control them at all.

like image 137
SLaks Avatar answered Sep 25 '22 01:09

SLaks