I have a chart of customers where I need to manually open each customer by "opening in new tab"
I am trying to use a jQuery script so that when I input the script in the console it will open every customer link within that page for me.
Below is the code I have right now. This code works to an extent that it opens only the first customer link out of the 50 in the customer page. Can anyone help me to configure it so it will open every customer in a new tab on the given page?
(I am using the latest version of chrome as my browser)
var $pbfLinks = $('.name a');
for (var i = 0; i < $pbfLinks.length; i++) {
var element = $pbfLinks[i];
var $pbfLink = $(element);
$pbfLink.attr('target', '_blank');
$pbfLink[i].click(function() {
window.open($pbfLink);
});
};
<tbody>
<tr data-bind-class="{selected: bulkOperations.selected[6463344]}"
data-define="{nestedLinkContainer: new Shopify.NestedLinkContainer(this)}">
<td class="select">
<div class="next-input-wrapper"><label class="next-label helper--visually-hidden next-label--switch" for="customer_ids_6463344">Select customer, Mayra </label><input type="checkbox" name="customer_ids_6463344" id="customer_ids_6463344" value="6463344" bind="bulkOperations.selected[6463344]" bind-event-change="bulkOperations.selectionChanged()" class="next-checkbox" /><span class="next-checkbox--styled"><svg class="next-icon next-icon--size-10 checkmark"> <use xlink:href="#next-checkmark-thick" /> </svg></span></div>
</td>
<td class="name no-wrap">
<a data-nested-link-target="true" href="/admin/customers/6463344">Mayra </a>
</td>
<td class="location type--subdued">
US
</td>
<td class="orders tc">0</td>
<td class="last_order tc">
—
</td>
<td class="money_spent tr">$0.00</td>
</tr>
<tr data-bind-class="{selected: bulkOperations.selected[6463317764]}"