# How to add some head information to gen js?

**URL:** https://community.haxe.org/t/how-to-add-some-head-information-to-gen-js/2316
**Category:** Haxe
**Created:** [March 19, 2020, 1:42am UTC](https://community.haxe.org/t/how-to-add-some-head-information-to-gen-js/2316 "2020-03-19T01:42:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Zhan](https://community.haxe.org/user_avatar/community.haxe.org/zhan/32/468_2.png) [@Zhan](https://community.haxe.org/u/Zhan)
#### Post date: [March 19, 2020, 1:42am UTC](https://community.haxe.org/t/how-to-add-some-head-information-to-gen-js/2316/1 "2020-03-19T01:42:55Z")

</div>

```haxe
// ==UserScript==
// @name Sketchfab download script
// @description lets you download Sketchfab models
// @author Reinitialized
//
//Version Number
// @version 1.0
//
// Urls process this user script on
// @include /^https?://(www\.)?sketchfab\.com/3d-models/.*$/
// ==/UserScript==

(function ($global) { "use strict";
var MainJs = function() { };
MainJs.main = function() {
	console.log("src/MainJs.hx:10:","hello");
};

MainJs.main();
})({});

```

some thing like that before js?

---

<div class="post-metadata">

### Author: ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)
#### Post date: [March 19, 2020, 9:03am UTC](https://community.haxe.org/t/how-to-add-some-head-information-to-gen-js/2316/2 "2020-03-19T09:03:25Z")

</div>

Create a `header.txt` that contains that comment block, then add the following to your HXML file:

```haxe
--macro includeFile("header.txt")
# avoid "Generated by Haxe" if header needs to be the first thing in the .js file
-D source-header=

```

---

<div class="post-metadata">

### Author: ![Zhan](https://community.haxe.org/user_avatar/community.haxe.org/zhan/32/468_2.png) [@Zhan](https://community.haxe.org/u/Zhan)
#### Post date: [March 19, 2020, 10:17am UTC](https://community.haxe.org/t/how-to-add-some-head-information-to-gen-js/2316/3 "2020-03-19T10:17:08Z")

</div>

> [@Gama11](#):
>
> –macro includeFile(“header.txt”)

it’s work.thanks
