diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-21 09:28:28 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-25 17:12:27 +0200 |
commit | b2c21dbb1426c7581c2532b0630e6217bf3c29ca (patch) | |
tree | 8498a0344f9c998f5d87d046cd4e70e853be20a7 /apps/accessibility/src | |
parent | 263d2c89fb2a8faa0cfdee230de2177b34534c9b (diff) | |
download | nextcloud-server-b2c21dbb1426c7581c2532b0630e6217bf3c29ca.tar.gz nextcloud-server-b2c21dbb1426c7581c2532b0630e6217bf3c29ca.zip |
OpenSans font contrast option
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/accessibility/src')
-rw-r--r-- | apps/accessibility/src/App.vue | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/accessibility/src/App.vue b/apps/accessibility/src/App.vue index f2b0eff31d3..37dcc41eb2c 100644 --- a/apps/accessibility/src/App.vue +++ b/apps/accessibility/src/App.vue @@ -79,17 +79,17 @@ export default { this.serverData[type] = id; // Remove old link - let oldLink = document.querySelector('link[rel=stylesheet][href*=accessibility][href*=user-]'); - if (oldLink) { - oldLink.remove(); + let link = document.querySelector('link[rel=stylesheet][href*=accessibility][href*=user-]'); + if (!link) { + // insert new css + let link = document.createElement('link'); + link.rel = 'stylesheet'; + link.href = OC.generateUrl('/apps/accessibility/css/user-style.css'); + document.head.appendChild(link) + } else { + // force update + link.href = link.href.split('?')[0] + '?v=' + new Date().getTime(); } - - // Insert new css - let link = document.createElement('link'); - link.rel = 'stylesheet'; - link.href = OC.generateUrl('/apps/accessibility/css/user-style.css'); - link.href = link.href.split('?')[0] + '?v=' + new Date().getTime(); - document.head.appendChild(link) }) .catch(err => { console.log(err, err.response); |