G-Selector Setup

Add this simple script to your website to see elements highlighted directly on your site when reviewing Greadme reports.

1

Copy the script

<script>
(function() {
  // Check for the special parameter and activate the tool
  const params = new URLSearchParams(window.location.search);
  const selector = params.get('greadme-selector');
  
  if (selector) {
    // Load the tool and pre-fill the selector
    const script = document.createElement('script');
    script.src = 'https://greadme.com/tools/selector-finder.js';
    document.body.appendChild(script);
  }
})();
</script>
2

Add to your website

Add this script to your website in one of these locations:

  • Before the closing </body> tag
  • In your website's global JavaScript file
  • In your site's template/layout file

This is a one-time setup. The script is invisible to your users and only activates when you click a "Find Element" button in your Greadme reports.

3

Start finding elements

After adding the script, you'll see "Find Element" buttons next to selectors in your Greadme reports. Click these buttons to:

  • Open your website in a new tab
  • Automatically highlight the element
  • Scroll to its position

Frequently Asked Questions

Is this script safe?

Yes, it's completely safe. The script only activates when you use the "Find Element" feature from your Greadme dashboard. It doesn't collect any data, doesn't impact your site's performance, and is invisible to your regular visitors.

Do I need to update this script?

No, you only need to add it once. If we make improvements to the G-Selector tool, the updates will be automatically applied when you use it.

Will this slow down my website?

No. The script is very small and only loads the G-Selector tool when you specifically request it by clicking a "Find Element" button in your dashboard. It has no impact on your site's performance for regular visitors.

How does it handle dynamic class names?

Our G-Selector is designed to work with modern frameworks that use dynamic class names like CSS modules. It has a Smart Mode that automatically simplifies complex selectors to find the right elements even when class names change.

Need Help?

If you need assistance setting up the G-Selector or have any questions, please contact our support team.