progress on adding version string to some css
This commit is contained in:
@@ -3,4 +3,6 @@ define([], function () {
|
|||||||
// fix up locations so that relative urls work.
|
// fix up locations so that relative urls work.
|
||||||
require.config({ baseUrl: window.location.pathname });
|
require.config({ baseUrl: window.location.pathname });
|
||||||
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
|
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
|
||||||
|
require(['/common/rewrite-css.js']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
10
www/common/rewrite-css.js
Normal file
10
www/common/rewrite-css.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
define([
|
||||||
|
'/api/config',
|
||||||
|
], function (Config) {
|
||||||
|
if (!(Config && Config.requireConf && Config.requireConf.urlArgs)) { return; }
|
||||||
|
|
||||||
|
document.querySelectorAll('link[rel="stylesheet"][data-rewrite-href]').forEach(function (e) {
|
||||||
|
e.setAttribute('href', e.getAttribute('data-rewrite-href'));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
Reference in New Issue
Block a user