开发者

Fix missing HTML tags using Greasemonkey userscript

I need to open a web page that is somehow missing <html>...</html>. That is, the page content is only:

<head>
 ...
</head>
<b开发者_开发知识库ody>
 ...
</body>

without the enclosing HTML tags.

Firefox is willing to render this page, but not Chrome. I want to use userscript to fix it.

But since head and body has no parent, I can't insert anything before&after them.

Any idea how to do it? Thanks!


I don't think this will solve your issue or not. Please try this using jQuery :

$(document).ready(function(html){
       html = '<html>' + html + '</html>';
});

where html is the page without html tags.

See this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜