Skip to content

Commit

Permalink
Merge pull request #197 from dbfeatdb/master
Browse files Browse the repository at this point in the history
Allows code to run on a site that has a CSP that doesn't allow inline scripts and styles.
  • Loading branch information
marcelodolza authored May 23, 2022
2 parents 2ad8bb2 + f473bd2 commit 679c48b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions js/iziModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
this.isFullscreen = false;
this.headerHeight = 0;
this.modalHeight = 0;
this.$overlay = $('<div class="'+PLUGIN_NAME+'-overlay" style="background-color:'+options.overlayColor+'"></div>');
this.$overlay = $('<div class="'+PLUGIN_NAME+'-overlay"></div>').css("background-color",options.overlayColor);
this.$navigate = $('<div class="'+PLUGIN_NAME+'-navigate"><div class="'+PLUGIN_NAME+'-navigate-caption">Use</div><button class="'+PLUGIN_NAME+'-navigate-prev"></button><button class="'+PLUGIN_NAME+'-navigate-next"></button></div>');
this.group = {
name: this.$element.attr('data-'+PLUGIN_NAME+'-group'),
Expand Down Expand Up @@ -225,7 +225,7 @@
}

if (this.options.timeoutProgressbar === true) {
this.$header.prepend('<div class="'+PLUGIN_NAME+'-progressbar"><div style="background-color:'+this.options.timeoutProgressbarColor+'"></div></div>');
this.$header.prepend($('<div class="'+PLUGIN_NAME+'-progressbar">').append($('<div>').css("background-color",this.options.timeoutProgressbarColor)));
}

if (this.options.subtitle === '') {
Expand Down Expand Up @@ -876,7 +876,7 @@
this.$element
.off('.'+PLUGIN_NAME)
.removeData(PLUGIN_NAME)
.attr('style', '');
.removeAttr("style");

this.$overlay.remove();
this.$navigate.remove();
Expand Down
Loading

0 comments on commit 679c48b

Please sign in to comment.