Skip to content

Instantly share code, notes, and snippets.

@sterlingsky
Last active November 1, 2023 15:36
Show Gist options
  • Select an option

  • Save sterlingsky/48bf08195dd2423e76e4379dd61402ae to your computer and use it in GitHub Desktop.

Select an option

Save sterlingsky/48bf08195dd2423e76e4379dd61402ae to your computer and use it in GitHub Desktop.
Location Grabber Chrome Bookmarklet
javascript: (function (){let arr = document.querySelectorAll("tbody .uVccjd.n2Hdyf.r2A6yd.i9xfbb.N2RpBe[aria-checked='true']");console.log(arr);let output = [];for (let i = 0; i < arr.length; i++){ let item = arr[i]; let href2 = item.closest('tr[class*=w0Oumf]').querySelector('a.DuDIZe').href ; console.log(i, " - ", href2); let locationIn = href2.split('/'); let location = locationIn[4]; output.push(location); }let output1 = output.join("\n"); navigator.clipboard.writeText(output1);})();
@sterlingsky
Copy link
Author

How to Install

  1. Copy code
  2. Right Click on Chrome Bookmark Bar
  3. Click "Add Page"
  4. Name it Locations
  5. Paste the Code Copied in step one into the Bookmark's URL field
  6. Click 'Save'

Using the bookmarklet

  1. Open Your Google Business Profile businesses tab, navigate to a desired location group
  2. Check the checkboxes of the locations you want to copy
  3. click bookmarklet
    Your desired locations are now copied to your browser's clipboard.

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