#100 - remove tricky js force box check
This commit is contained in:
parent
aeb5bf63c9
commit
dbecda87bd
3 changed files with 56 additions and 24 deletions
|
|
@ -1,31 +1,31 @@
|
|||
// Users
|
||||
|
||||
const startObserving = (domNode, selector) => {
|
||||
const observer = new MutationObserver(mutations => {
|
||||
mutations.forEach(function (mutation) {
|
||||
// console.log(Array.from(mutation.addedNodes));
|
||||
// const startObserving = (domNode, selector) => {
|
||||
// const observer = new MutationObserver(mutations => {
|
||||
// mutations.forEach(function (mutation) {
|
||||
// // console.log(Array.from(mutation.addedNodes));
|
||||
|
||||
const elementAdded = Array.from(mutation.addedNodes).some(
|
||||
element => {
|
||||
return document.querySelector(selector);
|
||||
},
|
||||
);
|
||||
// const elementAdded = Array.from(mutation.addedNodes).some(
|
||||
// element => {
|
||||
// return document.querySelector(selector);
|
||||
// },
|
||||
// );
|
||||
|
||||
if (elementAdded) {
|
||||
// Select Client as default user role instead of Admin
|
||||
document.querySelector('input[value="client"]').checked = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
// if (elementAdded) {
|
||||
// // Select Client as default user role instead of Admin
|
||||
// document.querySelector('input[value="client"]').checked = true;
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
observer.observe(domNode, {
|
||||
childList: true,
|
||||
attributes: true,
|
||||
characterData: true,
|
||||
subtree: true,
|
||||
});
|
||||
// observer.observe(domNode, {
|
||||
// childList: true,
|
||||
// attributes: true,
|
||||
// characterData: true,
|
||||
// subtree: true,
|
||||
// });
|
||||
|
||||
return observer;
|
||||
};
|
||||
// return observer;
|
||||
// };
|
||||
|
||||
startObserving(document.body, '.k-users-view .k-dialog');
|
||||
// startObserving(document.body, '.k-users-view .k-dialog');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue