FORUMS
Remove All Ads from XDA

Bookmarklets

21 posts
Thanks Meter: 13
 
By izomiac, Junior Member on 28th December 2011, 07:30 AM
Post Reply Email Thread
Thought I'd share an interesting discovery. Amazon's Silk browser has acceptable support for bookmarklets. Add a bookmark and you can edit the URL, even using the javascript: protocol, and it won't assume you want hypertext transfer protocol colon forward-slash forward-slash prepended (grr... stupid url regex). Open the bookmarklet and it'll execute on the current tab.

Now, I haven't found a way to save bookmarklets from the web, so anything complex should probably be done as a javascript file (or copy/paste). Here's a proof of concept:

Code:
javascript:alert(location.href);
And you'd realistically want to use something like:

Code:
javascript:(function(){var s=document.createElement('script');s.src='yourserver/yourscript.js';document.documentElement.childNodes[0].appendChild(s);})()
Given that Android's support for Greasemonkey and plugins is rather limited, this is a great boon. Personally, I added one for my password manager, which makes web browsing so much more pleasant and secure.
The Following User Says Thank You to izomiac For This Useful Post: [ View ] Gift izomiac Ad-Free
 
 
2nd February 2016, 10:06 AM |#2  
alanthehat's Avatar
Member
Thanks Meter: 10
 
More
That's excellent, but how do you use it in the current version given that "bookmarks" is a separate tab?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes