Code Generation Sorcery: Concocting the Perfect Bookmarklet for Google Search Magic!

Unleash the power of JavaScript bookmarklets and transform your Google Search experience! This prompt guides AI to generate code that extracts Titles, URLs, Descriptions, and Dates from a Google search result page and elegantly displays them in a new tab as a formatted table. Results may vary in consistency due to the AI's interpretation of the task, but you'll often end up with a neat bookmarklet capable of collecting and organizing Google Search data. Perfect for SEO data enthusiasts and coding wizards alike!

R
refineai
·May 3, 2026·
9 3 14
$5.99
Prompt
309 words

Could you assist in creating a JavaScript bookmarklet to use in the Chrome browser, designed to work specifically on a Google search results page? The following detailed instructions are to be adhered to:

The bookmarklet needs to extract four types of data from each search result: the title, the URL, the description, and the date. Use JavaScript to select elements using the class selectors: 'h3.LC20lb' for the title, 'div.yuRUbf > a' for the URL, 'div.VwiC3b.yXK7lf.MUxGbd.yDYNvb.lyLwlc > span' for the description, and a best-guess selector for the date, given Google's inconsistency in providing a unique and consistent class for dates.

For search results that may not have a title, URL, description, or date, the bookmarklet should take into account these cases and add an empty string ('') to the respective piece of data.

Once all data has been collected, the bookmarklet needs to create a new browser tab. It is crucial that this step is implemented correctly. The method 'window.open()' should be used to open a new browser tab, and the new tab should be saved into a variable, e.g., var newTab = window.open();.

The bookmarklet should then generate a structured HTML document within this new tab. The title of the document should be 'Google Search Results', and an H1 header in the body of the document should display the same text.

The bookmarklet should then display the collected data in a well-structured table within this HTML document. The table should have columns labeled as ID, Title, URL, Description, and Date, with each row representing a search result.

Include CSS within the bookmarklet to style the table appropriately. Borders, padding, and a distinct background color for the table headers should be included.

To write the HTML document to the new tab, use newTab.document.open();, followed by newTab.document.write(yourHTML); and then newTab.document.close();.

Please provide the complete JavaScript bookmarklet code that meets these specifications.

Need help?

Connect with verified experts who can help you succeed.

Related Prompts

More prompts in Coding & Development

View All
Coding & Development
Universal

This Prompt Ads Sequential Function Calling To Models Other Than GPT 0613

This prompt ads sequential function calling to models other than GPT-0613

D
digitalmuse$2.99
39,910 89,588
Coding & Development
Universal

Create a personalized workout routine

Tailor a workout routine specifically designed for individual fitness goals

P
primequery$2.99
23,370 23,405
Coding & Development
Universal

GODMODE CHEATCODE

God Writes You a Letter Today. This is will help you find the perfect Bible Scripture that will guide you through a current problem you're facing.

S
signalcraft$3.99
13,574 13,622
Coding & Development
Universal

Creating a Personal Finance Tracker with [Technology/Tool]

Learn to create a personal finance tracker using [Technology/Tool]. Get code samples and budgeting tips.

F
focusqueryFree
376 385
Coding & Development
ChatGPT

Build an entire application using bubble.io with ChatGPT4

Build an entire app with bubble.io, assisted by chatGPT4, that knows bubble very well and is accurate 95% of the time. This prompt will help you maximize the quality of chatGPT assistance. Having detailed and step-by-step instructions is essential to progress fast with Bubble. This initial prompt will help you get started on a good basis. Follow it because I will make it even better.

P
promptframes$5.99
1,280 1,300
Coding & Development
Universal

Become LawyerGPT

Are you in a legal bind? This prompt can help you gain knowledge about how to handle your legal proceedings. DISCLAIMER: Please meet with a real lawyer to discuss your options.

P
promptbench$2.99
1,063 1,076