grunt-domman
Advanced tools
Comparing version 0.1.3 to 0.1.4
{ | ||
"name": "grunt-domman", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Grunt plugin for DOM manipulation", | ||
@@ -5,0 +5,0 @@ "homepage": "http://gitlab.alibaba-inc.com/trip-tools/grunt-domman", |
@@ -83,5 +83,11 @@ # grunt-domman | ||
### 0.1.4 | ||
- [+] 更新 load.js 支持 js 脚本 onload 后加载 | ||
- [!] offline.js 支持 angular seed 替换 | ||
## License | ||
Copyright (c) 2014 弘树. Licensed under the MIT license. |
@@ -9,5 +9,7 @@ /** | ||
var hasAngular = false; | ||
$('script[src]').each(function(idx, scriptNode){ | ||
var src = scriptNode.attribs.src; | ||
if(src.indexOf('base/qa-seed.js') != -1) { | ||
if(/qa-seed(-angular)?\.js/i.test(src)) { | ||
hasAngular = /angular/.test(src); | ||
$(scriptNode).remove(); | ||
@@ -20,4 +22,4 @@ } | ||
'<script>window._$isOffline$_=true;</script>' + | ||
'<script src="../../widgets/base/qa-seed-wlog-tmsparser.js?nocombo=true"></script>') | ||
'<script src="../../widgets/base/qa-seed' + (hasAngular ? '-angular' : '') + '-wlog-tmsparser.js?nocombo=true"></script>') | ||
.append('<meta name="aplus-offline" content="1">'); | ||
}; |
@@ -42,3 +42,3 @@ /** | ||
} else { | ||
scriptNodeHTML = '<script src="' + proxyPage + '?callback=handle_tms_fragment&src=' | ||
scriptNodeHTML = '<tms style="display:none" id="tms_fragment_' + nodeIdx + '"></tms><script src="' + proxyPage + '?id=' + nodeIdx + '&charset=' + tmsCharset + '&callback=handle_tms_fragment&src=' | ||
+ tmsPureLink + '" charset="' + tmsCharset | ||
@@ -45,0 +45,0 @@ + '"></script>'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16867
17
329
93
4