tasks/dentist.js
function remove_script_tags(){
      html = html.replace(/<script[^>]*>.*?<\/script>/g, function(str){
        if (str.match(/ type=/) && ! str.match(/text\/javascript/)) { return str; }
        else if (str.match(/src=['"]?(https?)/)) { return str; }
        else if (str.match(/src=['"]?\/\//)) { return str; }
        else if (! options.clean_scripts && str.match(/src=['"]/)) { return str; }
        else { return ""; }
      });
    }
function remove_script_tags(){
      html = html.replace(/<script[^>]*>.*?<\/script>/g, function(str){
        if (str.match(/ type=/) && ! str.match(/text\/javascript/)) { return str; }
        else if (str.match(/src=['"]?(https?)/)) { return str; }
        else if (str.match(/src=['"]?\/\//)) { return str; }
        else if (! options.clean_scripts && str.match(/src=['"]/)) { return str; }
        else { return ""; }
      });
    }
function remove_script_tags ( ) { html = html . replace ( / <script[^>]*>.*?<\/script> / g , function ( str ) { if ( str . match ( /  type= / ) && ! str . match ( / text\/javascript / ) ) { return str ; } else if ( str . match ( / src=['"]?(https?) / ) ) { return str ; } else if ( str . match ( / src=['"]?\/\/ / ) ) { return str ; } else if ( ! options . clean_scripts && str . match ( / src=['"] / ) ) { return str ; } else { return "" ; } } ) ; }
Remove script tags pointing at local assets. Avoid wiping external dependencies and non-JS content inside script tags
Remove script tags pointing at local assets . Avoid wiping external dependencies and non - JS content inside script tags