This is a SelfHelpPlugin that is used for LabJS integration
- Download the code into the
plugin
folder - Checkout the latest version
- Execute all
.sql
script in the DB folder in their version order
- use function
saveDataToSelfHelp
with parameters trigger_type
- string with valuesstarted
,updated
orfinished
extra_data
- object, each key of the object is saved in the data, if the value of the key is another object, it is converted toJSON
string- example:
if (typeof saveDataToSelfHelp === 'function') {
// Call the function
saveDataToSelfHelp('updated')
}
- prevent
reload
- add the code in the beginning to initialize an event listener for reloading
window.addEventListener('beforeunload', function(event) {
event.preventDefault(); // Prevents the default window unload behavior (page reload)
// Your beforeunload handling code here
});
- SelfHelp v6.12.1+