You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cryptpad/www/common/rewrite-css.js

13 lines
411 B
JavaScript

define([
'/api/config',
], function (Config) {
var urlArgs = Config && Config.requireConf && Config.requireConf.urlArgs;
if (!urlArgs) { return; }
document.querySelectorAll('link[rel="stylesheet"][data-rewrite-href]').forEach(function (e) {
var href = e.getAttribute('data-rewrite-href');
href += (/\?/.test(href)?'&':'?') + urlArgs;
e.setAttribute('href', href);
});
});