Created
April 21, 2014 13:40
-
-
Save mattsnyder/11143008 to your computer and use it in GitHub Desktop.
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
:ruby | |
@site = UT::SiteSucker.new(params[:url]) | |
= content_for :bottom_js do | |
:plain | |
window.launchTest = function(e){ | |
$('#utfst_start').remove() | |
$('#sucked_site').show() | |
}; | |
$('#utfst_start, #utfst_end, #sucked_iframe').height($(window).height()).css({ | |
zIndex: 99999, | |
background: 'white', | |
position: 'absolute', | |
top: 0 | |
}) | |
$('html').find('title').html('UserTesting.com') | |
var sucked_iframe = $('#sucked_iframe').contents().find('html').get(0) | |
sucked_iframe.innerHTML = $('#sucked_site').val() | |
#sucked_site | |
%textarea{style: 'display:none'} | |
= @site.html.html_safe | |
%iframe#sucked_iframe{src: '', width: '100%', frameBorder: "0"} | |
%iframe#utfst_start{src: fst_instructions_url('start'), width: '100%', frameBorder: "0", style: 'z-index:999999;'} | |
- if params[:c] | |
%iframe#utfst_end{src: fst_instructions_url('end_custom', url: @site.url), width: '100%', style: 'display: none', frameBorder: "0"} | |
- else | |
%iframe#utfst_end{src: fst_instructions_url('end', url: @site.url), width: '100%', style: 'display: none', frameBorder: "0"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment