Skip to content

Instantly share code, notes, and snippets.

@jdanyow
Created October 11, 2018 02:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdanyow/8e85e54901c6d39ac17433c93092beaa to your computer and use it in GitHub Desktop.
Save jdanyow/8e85e54901c6d39ac17433c93092beaa to your computer and use it in GitHub Desktop.
Instructions for creating a bookmarklet to display JSLL data-bi-name tags.

JSLL Content Tag Viewer

This document contains the steps for creating a bookmark enabling you to view any page’s JSLL “data-bi-name" tags. The instructions are chrome specific, similar steps will work in other browsers.

  1. In Chrome, press CTRL+SHIFT+B to display the bookmark bar.

  2. Right click on the bookmark bar and choose Add page....

  3. In the Edit bookmark dialog, clear the contents of the Name field and enter something like Show JSLL Content Tags.

  4. In the URL field, add the following:

    javascript: document.head.insertAdjacentHTML('beforeend', '<style>[data-bi-name]:hover{outline:purple dashed!important;cursor:crosshair!important}[data-bi-name]:hover:not([style*=top]){position:relative!important}[data-bi-name]:hover::before{position:absolute!important;top:0!important;left:0!important;pointer-events:none!important;z-index:100000;padding:2px!important;line-height:100%!important;content:attr(data-bi-name)!important;color:#fff!important;background-color:purple!important;font-size:12px!important;font-family:monospace!important;font-weight:400!important;text-decoration:none!important}</style>')
    
  5. The dialog should look like this: Edit bookmark dialog

  6. Click Save to finish creating the bookmarklet.

  7. Go to a docs page... click on the new Show JSLL Content Tags button in your bookmarks bar. You should see the content tags for elements you hover over. Content tags

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment