mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Update screenshots.html
This commit is contained in:
parent
88174fe136
commit
98c2bd638e
@ -252,7 +252,10 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('base').attr('href',urlParts.protocol+"//"+urlParts.hostname+"/");
|
$('base').attr('href',urlParts.protocol+"//"+urlParts.hostname+"/");
|
||||||
html = html.replace("<head>","<head><base href='"+urlParts.protocol+"//"+urlParts.hostname+"/' />");
|
var base = "<base href='"+urlParts.protocol+"//"+urlParts.hostname+"/' />";
|
||||||
|
var headIdx = html.indexOf('<head');
|
||||||
|
var endHeadIdx = html.indexOf('>', headIdx);
|
||||||
|
html = html.substring(0, endHeadIdx + 1) + base + html.substring(endHeadIdx + 1);
|
||||||
if ($("#disablejs").prop('checked')){
|
if ($("#disablejs").prop('checked')){
|
||||||
html = html.replace(/\<script/gi,"<!--<script");
|
html = html.replace(/\<script/gi,"<!--<script");
|
||||||
html = html.replace(/\<\/script\>/gi,"<\/script>-->");
|
html = html.replace(/\<\/script\>/gi,"<\/script>-->");
|
||||||
|
Loading…
Reference in New Issue
Block a user