Admin+Config: Add toggle that disables Cloudflare cache

It's now possible to disable the Cloudflare cache during development,
so the hacky workaround with the random number in the CSS/JS URLs is no
longer needed.

Development mode is automatically disabled by Cloudflare after 4 hours.
This commit is contained in:
Riyyi
2021-08-25 18:24:33 +02:00
parent 8e8d5714b4
commit 253a3fe2f6
7 changed files with 61 additions and 3 deletions
+18
View File
@@ -227,6 +227,24 @@ $(document).ready(function() {
});
//------------------------------------------
// Developer mode
$('#development-mode').on('click', function(e)
{
$.get('/admin/toggle-development-mode').done(function(data)
{
const response = JSON.parse(data);
if (response.success == true) {
alert("Development mode has been turned: " + response.result.value);
}
else {
alert("Development mode could not be enabled!")
console.log(data);
}
});
});
});
// @Todo