Hub Hack: Open Tiles in a New Window When "Auto Redirect to Item's Canonical URL" is Enabled

Follow

Use this Custom Code snippet to force Tiles to open in a new browser window 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
  • Notes: If you're using the Auto Redirect to Item's Canonical URL option on a Stream, this will open the link in a new browser window when any Tile in the Stream is clicked.

 

Code

<script>
Hubs.onLoad = Hubs.onPageChange = Hubs.onItemsLoaded = function(){
$("a.item-link[data-internal=false]").attr("target", "_blank");
};
</script>
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.