where to insert JS

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
User avatar
roedygr
Rank V - Professional
Posts: 367
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

where to insert JS

Post by roedygr »

inserting JS

You gave me this code some time ago to keep track of which files have not changed since the last validation. It has stopped working in 17. I can't find the place to insert it. What is the rabbit warren menu navigation?

// save as cache.js and include in batch target optionss user functions file
/*********************
* Set $cachefolder in onBeforeMainStart() to the folder to use to store data (it must end in a backslash)
*********************/

function onBeforeMainStart() {
$cachefolder='E:\\env\\htmlval\\cache\\';
}
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: where to insert JS

Post by Albert Wiersch »

Hello,

Here is the documentation page for onBeforeMainStart():
https://www.htmlvalidator.com/current/d ... nstart.htm

It's a Batch Wizard event function so you should open the Batch Wizard, load the target list that you want to apply it to, and then specify that file as the user functions file in the 'Target List Options' tab of the Batch Wizard.

I try to maintain backward compatibility so chances are high that it should still work like it did in previous versions. If it doesn't though then I would be happy to help if you can provide detailed information on what is not working.

By the way, I don't recommend use a js extension because it's not JavaScript. I recommend a txt or cfg file extension, however the extension of TNPL user function files doesn't really matter to CSS HTML Validator.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply