Hub Hack: Open Tiles in a New Tab

Follow

Use this Custom Code snippet to force Item Tiles to open in a new browser tab when clicked.


Warning

Hub Hacks are NOT official Uberflip features. They may not work on all Hubs, or may cause unexpected behavior. Before implementing a Hub Hack on a production Hub, we strongly recommending testing it in a safe environment (such as a staging Hub) if possible.

Uberflip Support is not able to help troubleshoot issues with Hub Hacks: if a Hub Hack is not working correctly in your Hub, Uberflip Support can only help you to disable it.

Details

  • Type: JavaScript
  • Placement: Body Bottom

 

Code

<script>
/*-- Tiles open in new tabs, modify jQuery selector to specify target --*/
Hubs.onLoad = Hubs.onPageChange = Hubs.onItemsLoaded = function(){
console.log("DOM ready");
$('.tile a.item-link').attr({"target": "_blank", "data-internal": "false"}).removeClass('hooked').off();
};
</script>
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.