mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
add cachebuster for dynamically loaded js files
This commit is contained in:
parent
3b9919a486
commit
e9f65be86a
|
@ -7284,7 +7284,7 @@ function sandbox(tgt, rules, cls, html) {
|
||||||
html = '<html class="iframe ' + document.documentElement.className + '"><head><style>' + globalcss() +
|
html = '<html class="iframe ' + document.documentElement.className + '"><head><style>' + globalcss() +
|
||||||
'</style><base target="_parent"></head><body id="b" class="logue ' + cls + '">' + html +
|
'</style><base target="_parent"></head><body id="b" class="logue ' + cls + '">' + html +
|
||||||
'<script>' + env + '</script>' + sandboxjs() +
|
'<script>' + env + '</script>' + sandboxjs() +
|
||||||
'<script>var d=document.documentElement,' +
|
'<script>var d=document.documentElement,TS="' + TS + '",' +
|
||||||
'loc=new URL("' + location.href.split('?')[0] + '");' +
|
'loc=new URL("' + location.href.split('?')[0] + '");' +
|
||||||
'function say(m){window.parent.postMessage(m,"*")};' +
|
'function say(m){window.parent.postMessage(m,"*")};' +
|
||||||
'setTimeout(function(){var its=0,pih=-1,f=function(){' +
|
'setTimeout(function(){var its=0,pih=-1,f=function(){' +
|
||||||
|
|
|
@ -364,7 +364,7 @@ function import_js(url, cb, ecb) {
|
||||||
var head = document.head || document.getElementsByTagName('head')[0];
|
var head = document.head || document.getElementsByTagName('head')[0];
|
||||||
var script = mknod('script');
|
var script = mknod('script');
|
||||||
script.type = 'text/javascript';
|
script.type = 'text/javascript';
|
||||||
script.src = url;
|
script.src = url + '?_=' + (window.TS || 'a');
|
||||||
script.onload = cb;
|
script.onload = cb;
|
||||||
script.onerror = ecb || function () {
|
script.onerror = ecb || function () {
|
||||||
var m = 'Failed to load module:\n' + url;
|
var m = 'Failed to load module:\n' + url;
|
||||||
|
|
Loading…
Reference in a new issue