// Function to handle mutations
const handleMutations = (mutationsList, observer) => {
mutationsList.forEach((mutation) => {
if (mutation.type === 'childList') {
mutation.addedNodes.forEach((node) => {
// Check if the added node is a video element
if (node.tagName && node.tagName.toLowerCase() === 'video') {
// Delete the video element
node.remove();
}
});
}
});
};
// Select the target node
const targetNode = document.body;
// Options for the observer (including the types of mutations to observe)
const config = { childList: true, subtree: true };
// Create an observer instance linked to the callback function
const observer = new MutationObserver(handleMutations);
// Start observing the target node for configured mutations
observer.observe(targetNode, config);
// To disconnect the observer later (when you want to stop watching for mutations)
// observer.disconnect();
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}