use board theme in frame if doesnt match global theme and user doesnt have custom theme selected

merge-requests/208/head
fatchan 4 years ago
parent 28b64809a6
commit 4104656b51
  1. 6
      gulp/res/js/forms.js

@ -16,6 +16,12 @@ function doModal(data, postcallback) {
clearInterval(checkInterval);
};
const modalframe = document.getElementById('modalframe');
modalframe.onload = () => {
if (localStorage.getItem('theme') === 'default') {
const currentTheme = document.head.querySelector('#theme').href;
modalframe.contentDocument.styleSheets[1].ownerNode.href = currentTheme;
}
}
if (modalframe && postcallback) {
checkInterval = setInterval(() => {
if (modalframe && modalframe.contentDocument.title == 'Success') {

Loading…
Cancel
Save