Skip to content
Permalink
Browse files

Fixes theme javascript to work with 'use strict'

  • Loading branch information...
Jaska committed Sep 25, 2019
1 parent 5ad818d commit 01b7f56673fdc24262ada56f9eb176b8173efa15
@@ -1,5 +1,5 @@
{
"js": 1554373157703,
"js": 1569402275085,
"css": 1554443013364,
"svg": 1554364154832
}
@@ -9,7 +9,7 @@ var responsive_tables_in_content = function() {

var tables = document.querySelectorAll('.wysiwyg .wp-block-table');
if (tables) {
for (i = 0; i < tables.length; i++) {
for (var i = 0; i < tables.length; i++) {

// add modifier class to affected table
tables[i].classList.add('wp-block-table--responsive');
@@ -30,7 +30,7 @@ var responsive_tables_in_content = function() {
}
}

}
};
responsive_tables_in_content();

/**
@@ -51,7 +51,7 @@ var wrap_old_images_with_caption = function() {
}
}
}
}
};
wrap_old_images_with_caption();

/**
@@ -96,5 +96,5 @@ var wrap_old_aligned_images = function() {

}
}
}
};
wrap_old_aligned_images();
@@ -11,7 +11,7 @@
* - works at least with 3 levels (probably more)
*
*/
aucor_navigation = function( menu, options ) {
var aucor_navigation = function( menu, options ) {

var extend = function ( defaults, options ) {
var extended = {};
@@ -220,6 +220,7 @@ aucor_navigation = function( menu, options ) {
----------------------------------------------- */

menu_toggle.addEventListener('click', function() {
var x;
if(menu_toggle.classList.contains('menu-toggle--active')) {

// remove .active class from hamburger icon
@@ -232,6 +233,9 @@ aucor_navigation = function( menu, options ) {
// focus out of the menu
menu_toggle.dispatchEvent(new Event('focus'));

x = 'menu-active--' + menu.getAttribute('id');
document.body.classList.remove(x);

} else {

// .active class to hamburger icon
@@ -240,6 +244,9 @@ aucor_navigation = function( menu, options ) {

// .active class to menu container
menu.classList.add('active');

x = 'menu-active--' + menu.getAttribute('id');
document.body.classList.add(x);
}
});

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 01b7f56

Please sign in to comment.
You can’t perform that action at this time.