1.8 added ability to create and load individual javascript files for javascript placeholders
1.8
Added new system to allow javascript to be loaded from files for javascript placeholders.
This system is pretty simple to use. When javascript placeholders are enabled, you can choose to load the javascript from a specific file for a certain placeholder by adding the following format to your "expression":
Code (Text):
placeholder:
expression: 'file: <filename with extension>'
type: string
After you specify a file: <filename> the first time in an expression value, a javascripts folder will appear in your PlaceholderAPI config folder.
From there you can create as many files you like.
Linking a file is as simple as specifying the "file: " keyword and file name in expression. If a file is specified and does not exist it will be created. Placeholders with empty files will not be loaded if a file is specified.
example:
Code (Text):
is_op:
expression: 'file: is_op.js'
type: string
is_op.js file:
You can still specify 1 line javascript in the javascript_placeholders.yml as long as the expression value does not start with "file: ".