-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetatt.js
34 lines (29 loc) · 1.15 KB
/
setatt.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Set configuration options and start the observer */
// Select the entire DOM for observing:
const target = document.querySelector('body');
// Create a new observer instance:
const observer = new MutationObserver(function() {
if (document.getElementsByClassName('track-horizontal')) {
console.log("track-horizontal was just appended!");
var list, index;
list = document.getElementsByClassName("react-grid-item");
for (index = 0; index < list.length; ++index) {
list[index].setAttribute("data-iframe-height", "");
console.log("Added data-iframe-height to all react-grid-items");
}
// Removed this as removing padding from all css- classes was making some tables look odd. Instead specivy css-xxxx class of div in boom theme settings.
// Find css- classes and remove padding:
// var list2, index2;
// list2 = document.querySelectorAll("[class^=css-]");
// for (index2 = 0; index2 < list2.length; ++index2) {
// list2[index2].style.padding = "0px";
// console.log("Added 0px padding to all css- classes");
// }
}
});
// Set configuration object:
const config = {
childList: true
};
// Start the observer
observer.observe(target, config);