Welcome Guest Search | Active Topics | Sign In | Register

Javascript Bookmarklets with eo web browser? Options
billyb3434
Posted: Sunday, March 27, 2016 7:04:52 PM
Rank: Newbie
Groups: Member

Joined: 3/21/2014
Posts: 6
Hey:
I am considering adding some custom buttons in my test app (built with eo web browser).
Some of these buttons will be used to call javascript bookmarklets that currently work with Chrome, FF, IE, etc...)

One specific example Bookmarklet I intend to use is the YouTube Downloader from http://deturl.com. Before I assign this task to my coder, is it safe to assume that javascript bookmarklets should normally work with EO Web Browser?

Below is a copy of the javascript for the bookmarklet for the YouTube Downloader:

javascript:(function(w,d,x){x=new(window.XMLHttpRequest||ActiveXObject)('Microsoft.XMLHTTP');x.onreadystatechange=function(){if(x.readyState==4){if(x.status==200)d.body.appendChild(d.createElement('script')).src=JSON.parse(x.responseText).query.results.url;else console.log('ERR',x.status,x.statusText)}};x.open('GET','//query.yahooapis.com/v1/public/yql?q='+encodeURIComponent('select * from json where url="http://noflr.deturl.com/l.asp"')+'&format=json');x.send()})(window,document);

Do you think this bookmarklet will work if I apply this javascript to a button in the toolbar?
eo_support
Posted: Monday, March 28, 2016 8:33:21 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

The JavaScript code should work. You will need to call WebView.EvalScript to run the code.

Thanks!
billyb3434
Posted: Monday, March 28, 2016 8:34:44 AM
Rank: Newbie
Groups: Member

Joined: 3/21/2014
Posts: 6
Awesome! Thanks! :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.