# Open New Window/Tab via API

**URL:** https://meta.discourse.org/t/open-new-window-tab-via-api/143964
**Category:** Support
**Created:** [March 11, 2020, 9:01pm UTC](https://meta.discourse.org/t/open-new-window-tab-via-api/143964 "2020-03-11T21:01:34Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jordan.vidrine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jordan.vidrine/32/515563_2.png) [@jordan.vidrine](https://meta.discourse.org/u/jordan.vidrine)
#### Post date: [March 12, 2020, 1:42pm UTC](https://meta.discourse.org/t/open-new-window-tab-via-api/143964/4 "2020-03-12T13:42:57Z")

</div>

The code below was taken from a reply marked as a solution in a previous topic.

```xml
<script type="text/discourse-plugin" version="0.4">
api.decorateWidget('header-buttons:after', helper => { 
const showExtraInfo = helper.attrs.minimized; 
if (!showExtraInfo) { 
return helper.h('a.blog-link', {href:'https://blog.example.com', target:'_blank'}, 'Visit our blog'); } 

});
 </script>

```

> [@Customized header link target attribute being ignored](https://meta.discourse.org/t/customized-header-link-target-attribute-being-ignored/57380/3):
>
> I placed that in the Customize → CSS/HTML → `</head>` section. Running 1.8.0 beta4 (upgrading to beta5 to see if it helps).

did you visit [this topic reply?](https://meta.discourse.org/t/customized-header-link-target-attribute-being-ignored/57380/3)

---

_[View the full topic](https://meta.discourse.org/t/open-new-window-tab-via-api/143964)._
