fix for caching plugin-definitions

This commit is contained in:
webzwo0i 2021-02-15 08:52:38 +01:00 committed by John McLear
parent bdb78adb3f
commit 0bb3e65020
5 changed files with 32 additions and 20 deletions

View file

@ -12,9 +12,10 @@ exports.update = (cb) => {
// of execution on Firefox. This schedules the response in the run-loop,
// which appears to fix the issue.
const callback = () => setTimeout(cb, 0);
$.ajaxSetup({cache: false});
jQuery.getJSON(`${exports.baseURL}pluginfw/plugin-definitions.json`).done((data) => {
jQuery.getJSON(
`${exports.baseURL}pluginfw/plugin-definitions.json?v=${clientVars.randomVersionString}`
).done((data) => {
defs.plugins = data.plugins;
defs.parts = data.parts;
defs.hooks = pluginUtils.extractHooks(defs.parts, 'client_hooks');