Wednesday, May 22, 2019

Is there a way to use PC browser bookmarklets with the Android Browser or Dolphin HD?



Can I make these work on Android or is there a google place to create or convert bookmarklets to make them Android Compatible?



Answer



Finally got it to work and it wasn't complicated at all.


Simply create a bookmark and paste the javascript into the URL field. I've tried it on this bookmarklet that does a google definition search:


javascript: s = (window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text); if (s == '') { l = parent.frames.length; if (l != 1) { for (i = 0; i < l; i++) { s = parent.frames[i].document.getSelection ? parent.frames[i].document.getSelection() : parent.frames[i].document.selection.createRange().text; if (s) { break; } } } } if (s == '') { void( s = prompt('Google Define: Enter a term or mark some text.','') ); } if (s) { s = String(s); s = s.replace(/^s*|s*$/g,''); s = escape(s);void( bmw = open('http://www.google.com/search?num=100&start=0&q=define:'+s+'','GoogleDefineBM'+String(Math.round(Math.random()*1000))) );}


To get it saved as a bookmark I just saved the text in evernote then copied it on my phone an pasted it in the url field of "new bookmark." To make it even easier to access I created a custom dolphin gesture that opens it as "Go To URL". Now when I'm browsing and I want to lookup a word I hit the gesture button and draw a "d" and it brings up a popup that allows me to lookup the word.


I've only tried this on Dolphin Browser HD.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...