mirror of
https://github.com/remy/inliner.git
synced 2024-09-11 17:25:30 +03:00
fix: don't uglify non-js script elements
i.e. when a script is being used for a template holder. So we use the `type` attribute check to be sure. Fixes #68
This commit is contained in:
parent
0917c29ad4
commit
a2a3e95607
@ -8,11 +8,16 @@ function resolve(inliner, todo, $) {
|
||||
return todo.map(function scripts(script) {
|
||||
var $script = $(script);
|
||||
var src = $script.attr('src');
|
||||
var type = $script.attr('type');
|
||||
var source = $script.text();
|
||||
|
||||
var promise;
|
||||
var isMinified = false;
|
||||
|
||||
if (type && type.toLowerCase() !== 'text/javascript') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ext script
|
||||
if (src) {
|
||||
isMinified = src.indexOf('.min.') !== -1;
|
||||
|
Loading…
Reference in New Issue
Block a user