forked from binux/pyspider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block scripts in iframe, use dataurl to prevent referer content block
- Loading branch information
Showing
5 changed files
with
65 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
*.py[cod] | ||
data/* | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
</head> | ||
|
||
<body> | ||
<script> | ||
parent.parent.resize_iframe({{ height }}); | ||
</script> | ||
</body> | ||
</html> | ||
<!-- vim: set et sw=2 ts=2 sts=2 ff=unix fenc=utf8: --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// vim: set et sw=2 ts=2 sts=2 ff=unix fenc=utf8: | ||
// Author: Binux<[email protected]> | ||
// http://binux.me | ||
// Created on 2014-03-16 11:05:05 | ||
|
||
window.addEventListener('load', function() { | ||
var height = document.body.scrollHeight; | ||
var iframe = document.createElement('iframe'); | ||
iframe.height = 0; | ||
iframe.width = 0; | ||
iframe.frameborder = 0; | ||
iframe.src = "http://{{ host }}/helper/resizer.html?height="+height+"&nocache="+(new Date()).getTime(); | ||
document.body.appendChild(iframe); | ||
}); |