...
 
Commits (2)
......@@ -4,6 +4,7 @@ import PrintMedia from "./print-media";
import Splits from "./splits";
import Counters from "./counters";
import Lists from "./lists";
import RemoveNode from "./removeNode";
export default [
AtPage,
......@@ -11,5 +12,6 @@ export default [
PrintMedia,
Splits,
Counters,
Lists
Lists,
RemoveNode
];
import Handler from "../handler";
import csstree from "css-tree";
class removeNode extends Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
beforeParsed(content) {
// remove all script elements
content.querySelectorAll("script").forEach( script => { script.remove(); });
}
}
export default removeNode;