Permalink
Browse files

SHARKIFY

  • Loading branch information...
thisisaaronland committed Jan 5, 2012
1 parent 4c61367 commit 2c5b9ff917e21b765d3bff3b64861ce655a13bd6
View
@@ -17,5 +17,6 @@ js:
java -Xmx64m -jar lib/google-compiler/compiler-20100616.jar --js www/javascript/ffbp.js > www/javascript/ffbp.min.js
java -Xmx64m -jar lib/google-compiler/compiler-20100616.jar --js www/javascript/jquery.lightbox.ffbp.js > www/javascript/jquery.lightbox.ffbp.min.js
java -Xmx64m -jar lib/google-compiler/compiler-20100616.jar --js www/javascript/photo.geo.js > www/javascript/photo.geo.min.js
+ java -Xmx64m -jar lib/google-compiler/compiler-20100616.jar --js www/javascript/sharkify.js > www/javascript/sharkify.min.js
clean:
rm -f ./TODO.txt
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
@@ -42,6 +42,8 @@
$GLOBALS['cfg']['flickr_push_enable_photos_friends_faves'] = 1;
$GLOBALS['cfg']['flickr_push_enable_photos_recent_activity'] = 0; # still full of weirdness (20111221/straup)
+ $GLOBALS['cfg']['enable_feature_sharkify'] = 1; # http://www.iamcal.com/sharkify/
+
# See this? It assumes everything is running on a single
# (read: not federated) database.
View
@@ -0,0 +1,20 @@
+sharkify_add = function(){
+ var s = [[222,123],[387,220],[303,136],[250,186]];
+ var i = Math.ceil(Math.random()*s.length);
+ var a = typeof(window.innerHeight) == 'number';
+ var b = document.documentElement && document.documentElement.clientHeight;
+ var h = a ? window.innerHeight : b ? document.documentElement.clientHeight : document.body.clientHeight;
+ var w = a ? window.innerWidth : b ? document.documentElement.clientWidth : document.body.clientWidth;
+ var d = document.createElement('div');
+ d.style.position = 'fixed';
+ d.style.left = (Math.random()*(w-s[i-1][0]))+'px';
+ d.style.top = (Math.random()*(h-s[i-1][1]))+'px';
+ d.style.zIndex = 10;
+ var m = document.createElement('img');
+ m.onclick=sharkify_add;
+ m.style.cursor='pointer';
+ m.src=abs_root_url+'images/shark_'+i+'.gif';
+ var body = document.getElementsByTagName('body')[0];
+ body.appendChild(d);
+ d.appendChild(m);
+}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -25,10 +25,18 @@
{/if}
|
<a href="{$cfg.abs_root_url}signout/">signout</a>
+{if 'sharkify'|@features_is_enabled}
+ ...
+ <a href="#" onclick="sharkify_add();return false;">sharkify</a>
+{/if}
{else}
{if $cfg.enable_feature_signin}
<a href="{$cfg.abs_root_url}signin/?redir={$smarty.server.REQUEST_URI|escape:'url'}">sign in with your flickr account</a>
{/if}
+ {if 'sharkify'|@features_is_enabled}
+ ...or
+ <a href="#" onclick="sharkify_add();return false;">sharkify</a>
+ {/if}
{/if}
</div>
@@ -8,6 +8,12 @@
<script type="text/javascript" src="{$cfg.abs_root_url}javascript/modestmaps.min.js"></script>
<script type="text/javascript" src="{$cfg.abs_root_url}javascript/modestmaps.markers.js"></script>
<script type="text/javascript" src="{$cfg.abs_root_url}javascript/htmapl.js"></script>
+ {if 'sharkify'|@features_is_enabled}
+ <script type="text/javascript" src="{$cfg.abs_root_url}javascript/sharkify.min.js"></script>
+ {/if}
+ <script type="text/javascript">
+ var abs_root_url='{$cfg.abs_root_url}';
+ </script>
{$extra_head}
</head>
<body>

0 comments on commit 2c5b9ff

Please sign in to comment.