COMMUNITY

How to add some head information to gen js?

// ==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?

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

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

it’s work.thanks