Currently, I am in the process of developing a Bookmarklet that will modify the functionality of the Google homepage. One feature that really stands out to me is the visual search page preview option - it's truly amazing! However, I have an idea to enhance this even further by turning it into a live search instead of requiring users to mouseover the links.
I have made some progress with the functionality, and here is the JavaScript code that I have so far:
javascript: (function() {
c = document.getElementById('ires');
nli = document.createElement('div');
//Rest of the JavaScript code goes here...
})();
Currently, the process works like this:
- Copy and paste the provided code into a bookmark
- Perform a search on Google
- Click on the magnifying glass icon
- Click on the bookmark you created
However, there seems to be an issue where the links added to the page are not clickable unless text boxes are present in the image preview. According to my knowledge of the DOM, the entire content within the <a>
tag should be clickable.
If anyone has any insight into what might be causing this problem, I would greatly appreciate your input.
Another aspect I am looking to address is how to automatically query the images without requiring user interaction.
Once this is achieved, my plan is to convert the functionality into an event listener that queries and displays the images as soon as a key is pressed in the search window.
Imagine how amazing that would be!
Although I'm having trouble getting the bookmarklet to "compile" on this platform, you can drag the provided link into your toolbar from here: .
Alternatively, the href should look something like this:
<a href="Example Bookmarklet Code URL">bookmarklet</a>