Created
October 11, 2012 15:15
-
-
Save krukid/3873143 to your computer and use it in GitHub Desktop.
GoViral "Syndicated Player" Sinatra test server
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
require 'sinatra' | |
get '/' do | |
erb :index | |
end | |
get '/iframe' do | |
erb :iframe | |
end | |
get '/noframe-nocache' do | |
headers 'Content-Type' => "text/html;charset=utf-8", | |
'Pragma' => "no-cache", | |
'Expires' => "Fri, 01 Jan 1990 00:00:00 GMT", | |
"Cache-Control" => "no-cache, no-store, max-age=0, must-revalidate" | |
erb :iframe_bare | |
end | |
get '/noframe' do | |
erb :iframe_bare | |
end | |
__END__ | |
@@ index | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript">document.domain = 'gipoo.net'</script> | |
</head> | |
<body> | |
<h1>GoViral in an IFRAME</h1> | |
<iframe src="/iframe" style="width:500px;height:500px;border:solid 2px red"></iframe> | |
</body> | |
</html> | |
@@ iframe | |
<!DOCTYPE> | |
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript">document.domain = 'gipoo.net'</script> | |
</head> | |
<body> | |
<div class="gv-placement-sp" id="gv_target_5406383713491043711436687"></div> | |
<script>!function(d, s, id) { | |
var js, pjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); | |
js.id = id; | |
js.src = "http://player-services.goviral-content.com/embed-code/index/find?placementVersionId=5406383713491043711436687"; | |
pjs.parentNode.insertBefore(js, pjs); | |
}(document, 'script', 'gv_script_5406383713491043711436687');</script> | |
</body> | |
</html> | |
@@ iframe_bare | |
<div class="gv-placement-sp" id="gv_target_5406383713491043711436687"></div> | |
<script>!function(d, s, id) { | |
var js, pjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); | |
js.id = id; | |
js.src = "http://player-services.goviral-content.com/embed-code/index/find?placementVersionId=5406383713491043711436687"; | |
pjs.parentNode.insertBefore(js, pjs); | |
}(document, 'script', 'gv_script_5406383713491043711436687');</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment