snoopy icon indicating copy to clipboard operation
snoopy copied to clipboard

Stock Android browser doesn't support bookmarklets...

Open allmarkedup opened this issue 15 years ago • 8 comments

Need to try and see if there is some way to work around this. Impossible? Probably :-(

allmarkedup avatar Sep 10 '10 10:09 allmarkedup

For those whom are technological (word?) you can use ADB to insert the bookmarklet into the sqlite3 database; bookmarks.

I remember reading something like:

update bookmarks set url='bookmarklet_source' where _id='id'

Not so easy though. Other than that, nothing as of yet.

jbrooksuk avatar Sep 17 '10 20:09 jbrooksuk

ok, this is a start though - have you actually been able to verify this yourself? Do you have an android handset to test this on? (I don't unfortunately, although I may try and get one soon to investigate stuff like this).

allmarkedup avatar Sep 19 '10 11:09 allmarkedup

I didn't have time to test it whilst writing it.

I do have an Android phone, HTC Desire with Sense, however the internals work the same as Nexus One for example.

I'll give it a test and report back!

jbrooksuk avatar Sep 19 '10 12:09 jbrooksuk

Not quite sure what I'm looking at here - this just seems to be some example bookmarklets? The problem with Android is (as I understand it) that it doesn't allow you to use the javascript: pseudo-protocol in bookmarks... so none of these would run, which is the problem with Snoopy. Am I missing something here...?

allmarkedup avatar Sep 21 '10 18:09 allmarkedup

Woops! Forgot the rest of the link.

There is a discussion about Android bookmarklets here. http://code.google.com/p/bookmarklets/issues/detail?id=1#c6

I shall test out what this guy is saying.

jbrooksuk avatar Sep 21 '10 22:09 jbrooksuk

javascript:alert(3);

Definitely worked for me, using the unescape eval method! Now to implement it into the bookmarklet code! Hopefully should continue working for iOS devices too.

jbrooksuk avatar Sep 21 '10 22:09 jbrooksuk

Ahh excellent, I see now... sounds like a good solution, just need to make sure it's properly tested with the Snoopy bookmarklet. Whilst I don't want to have different versions of the main codebase for different platforms, I'm not too worried about having a different version of the bookmarklet code specifically for Android, if needs be.

allmarkedup avatar Sep 22 '10 07:09 allmarkedup

Can you test to see if the unescape eval method works on the iPhone? If it does, there should be no need to have two different versions.

Fingers crossed iOS still works!

jbrooksuk avatar Sep 22 '10 08:09 jbrooksuk