Browse Source

add workaround to deal with CSP interruption of theme_option.js

nin-v2
Simon Grim 6 years ago
parent
commit
b008986efc
  1. 7
      js/theme_option.js

7
js/theme_option.js

@ -11,10 +11,11 @@ $(function () { @@ -11,10 +11,11 @@ $(function () {
testRightSide();
reOrganizeTemplates();
$.globalEval(postToElem.toString().replace(/postContext.append\(_templatePostRtBy/,
'postContext.prependTo(postContext.parent()).append(_templatePostRtBy'));
// indirect eval call in hope to execute code globally
(1, eval)(postToElem.toString().replace(/postContext.append\(twister\.tmpl\.postRtBy/,
'postContext.prependTo(postContext.parent()).append(twister.tmpl.postRtBy'));
$.globalEval(openModal.toString().replace(/window_scrollY = window\.pageYOffset;/, '')
(1, eval)(openModal.toString().replace(/window_scrollY = window\.pageYOffset;/, '')
.replace(/\$\('body'\)\.css\('overflow', 'hidden'\);/, ''));
$('.userMenu-home.current a').on('click', function () {

Loading…
Cancel
Save