Last active
August 29, 2015 14:18
-
-
Save n-yoda/e15012435a3b4713be03 to your computer and use it in GitHub Desktop.
Twitterの上にスワイプすると飛んでいくマサイ族をブラウザで楽しむブックマークレット
This file contains hidden or 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
/* | |
bookmarkletify twitter-maasai.js | |
javascript:(function(){;var%20x=$(%22.media-image%22);var%20y=x.clone().appendTo(%22body%22).css(%7Bposition:%22absolute%22,top:x.offset().top,left:x.offset().left,zIndex:5e3%7D).animate(%7Btop:$(window).scrollTop()-x.height()%7D,300,%22swing%22,function()%7By.remove()%7D);x.css(%7Bopacity:0%7D).delay(1e3).animate(%7Bopacity:1%7D);})() | |
*/ | |
var x = $('.media-image'); | |
var y = x.clone().appendTo('body') | |
.css({position: 'absolute', top: x.offset().top, left: x.offset().left, zIndex: 5000}) | |
.animate({top: $(window).scrollTop() - x.height()}, 300, 'swing', function(){y.remove()}); | |
x.css({opacity:0}).delay(800).animate({opacity:1}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment