Skip to content

Commit

Permalink
Hide the part that gives the URL if we don't have a URL defined. Will…
Browse files Browse the repository at this point in the history
… update this with the actual short URL once we make it.
  • Loading branch information
savetheclocktower committed Sep 26, 2010
1 parent 34cbacc commit b7c437b
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions demos/hardware.html
Expand Up @@ -16,6 +16,10 @@

<script src="../dist/prototype.s2.min.js" type="text/javascript"></script>

<script type="text/javascript">
window.SHORT_URL = 'http://bit.ly/2er';
</script>

<style type="text/css" media="screen">
#panel div.panel {
position: absolute;
Expand Down Expand Up @@ -206,12 +210,18 @@ <h1>CSS Transitions</h1>
Effects can't always be hardware-accelerated, but scripty2 ensures that each browser &mdash;
whether mobile or desktop &mdash; gets the <strong>smoothest animation possible</strong>.
</p>
<p id="iphone">Here's a short URL for this page: http://. Try it on an iPhone or iPad!</p>
<p id="iphone">Here's a short URL for this page: <a href="" class="url"></a>. Try it on an iPhone or iPad!</p>

<script type="text/javascript">
if (Prototype.Browser.MobileSafari) {
$('iphone').hide();
}
(function() {
if (!SHORT_URL || Prototype.Browser.MobileSafari) {
$('iphone').hide();
} else {
var anchor = $('iphone').down('.url');
anchor.writeAttribute('href', SHORT_URL);
anchor.update(SHORT_URL);
}
})();
</script>
</div> <!-- #frame_5 -->

Expand Down

0 comments on commit b7c437b

Please sign in to comment.