View
Theme
Font Style
7pt
8pt
9pt
10pt
11pt
Line Style
100%
110%
120%
130%
140%
Bold Keyword
Default
Inspector
Kkaefer
Eclipse
SQ Light
Lesser
Dark
Cobalt
Monokai
Rubyblue
Night
SQ Dark
Ambiance
Blackboard
Line Num.
Wrap Lines
Preview
Redraw
JS Tab
HTML Tab
CSS Tab
Live Tab
Prev. Tab
Next Tab
Browser
History…
Help
Edit
Settings
Auto Complete
Match Brackets
Match Highlight
Strip Whitespace
Auto Close Brackets
Auto Close Quotes
Show Print Margin
Undo
Redo
Delete
Select Line
Select All
Find & Replace
Find
Find in Repo.
Find Next
Find Previous
Replace Single
Replace All
Wrap Search
Revert
As Template
Diff Revision
Format
Compress
Text
Zen Coding
Indent
Tab Width
1
2
3
4
5
6
7
8
Indent Unit
1
2
3
4
5
6
7
8
Smart Indent
Use Tabs
Visible Tabs
Shift Left
Shift Right
Put Indent
Number
Increment by 1
Decrement by 1
Increment by 0.1
Decrement by 0.1
Increment by 10
Decrement by 10
Simple Math
Comment
Line
Move Up
Move Down
Copy Up
Copy Down
Go to Line…
Remove Line
Next Point
Prev. Point
Help
Share
Login
You can jump to the latest bin by adding
/latest
to your URL
×
z
Find
→
←
⟲
Replace
⊗
All
Replace
(function($){ var conf ={}, apiURL='', apiSEARCH = "http://search.twitter.com/search.json?q=", param='', time=10, lang='', num_harvesting_msg=5, destination_element ='tw' $.feel = { words: {}, tweets_stack: [], words_iterator: 0, speed:0, // 0 is slow, 100 is fast loverate:500, //0 is hate, 1000 is love tempo:null, start: function(opt) { this.registerVar(opt); apiURL = this.createURL(0); this.harvest(0); setTimeout(function(){$.feel.play();},1000); }, stop: function(){ window.clearTimeout(this.tempo); delete this.tempo; }, registerVar: function(opt){ lang=opt.lang?opt.lang:""; num_harvesting_msg=opt.num_harvesting_msg?opt.num_harvesting_msg:num_harvesting_msg; this.words = opt.words; }, createURL: function(wordi){ // wordi is the inc elem from word var url = ''; jlg=lang.length>0?"&lang="+lang:jlg=""; param='&since_id='+this.words[wordi].last_id; url=apiSEARCH+this.words[wordi].searchstr+param+jlg; url += "&rpp="+num_harvesting_msg; return url; }, harvest: function(wordi){ $.ajax({ url: this.createURL(wordi), type: 'GET', dataType: 'jsonp', timeout: 1000, error: function(){ // $("#log").append('
fail to load#
'); }, success: function(json){ results_length = json.results.length; $.each(json.results,function(i,item) { $.feel.tweets_stack.push(item); if(i>=(results_length-1)) $.feel.words[wordi].last_id = item.id; }); } }); }, textFormat: function(texto){ //make links var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; texto = texto.replace(exp,"
$1
"); var exp = /[\@]+([A-Za-z0-9-_]+)/ig; texto = texto.replace(exp,"
@$1
"); // make it bold $.each(this.words,function(i,w){ regExp=eval('/'+'i '+w.label+'/gi'); newString = new String('
'+'i '+w.label+'
'); texto = texto.replace(regExp, newString); }); return texto; }, play: function(){ // let's play at different speed depending on the stack stacksize = this.tweets_stack.length; if(stacksize <5){ this.speed = 0;//slow this.num_harvesting_msg = 15; } if(stacksize>5){ this.speed = 10;// rather slow this.num_harvesting_msg = 10; } if(stacksize>15){ this.speed = 80;// quite fast this.num_harvesting_msg = 5; } if(stacksize>30){ this.speed = 90;// quite fast this.num_harvesting_msg = 1; } waitingtime = Math.abs((100 - this.speed)*20); this.tempo = setTimeout("$.feel.play()",waitingtime); //let's harvest if(stacksize<40){ wi=Math.floor(Math.random()*this.words.length);// this could be improved while(this.words_iterator==wi){ wi=Math.floor(Math.random()*this.words.length); } this.words_iterator = wi; this.harvest(wi); } //let's display if(stacksize>0){ this.display(this.tweets_stack.shift()); } }, display: function(tw){ // running text a = $('
').attr('href','http://www.twitter.com/'+tw.from_user+'/status/'+tw.id).html(' '+tw.from_user).addClass('u'); $('
').html(this.textFormat(tw.text)).append(a).css('margin-left',this.loverate).prependTo('#'+destination_element); $('#'+destination_element+' li:nth-child(30)').remove(); that = this; $.each(this.words,function(i,w){ var exp = eval('/'+w.label+'/ig'); if(tw.text.match(exp)){ that.loverate += (w.value); } }); if(that.loverate>1000)that.loverate=900; if(that.loverate<0)that.loverate=10; $('#cursor').css('left',(that.loverate)); } } })(jQuery); var st = 'play'; $(document).ready(function() { var words=[{label:'hate',searchstr:'i%20hate',value:-3},{label:'dislike',searchstr:'i%20dislike',value:-2},{label:'like',searchstr:'i%20like',value:1},{label:'love',searchstr:'i%20love',value:2}]; $.feel.start({ words : words, num_harvesting_msg:5 }); tweets_stack = []; words_iterator = 0; //pause & resume $('#cursor').bind('click',function(){ if(st=='play'){ $.feel.stop(); st='pause' } else{ $.feel.play(); st='play' } }).bind('mouseover',function(){ if(st=='play') $(this).addClass('pause'); else $(this).addClass('play'); }).bind('mouseout',function(){ $(this).removeClass('pause').removeClass('play'); }).css('cursor','pointer'); $('#about a').click(function(){$('#header').slideToggle();}); });
love|hate
what is this ?
a snapshot of human emotions
love
hate
is a snapshot of the world's state of mind in real time.
hate
on one side,
love
on the opposite one and in between a cursor oscilliating with the messages cast by anonymous people on the web.
love
hate
cursor
/* i love stubbornella */ body{font:15px Helvetica,Arial,sans-serif;text-align:center;overflow:hidden;} a {text-decoration:none;} #bar, #tw, #header{position:relative;text-align:left;margin:auto;width:1000px;} #header h1{font:normal 27px Helvetica,Arial,sans-serif;margin:0 0 0 0;} #header{padding-bottom:50px;color:#666;font:normal 15px Helvetica,Arial,sans-serif; display:none;} #tw.li{list-style-type:none;padding:0;margin:0;} #tw{list-style-type:none;padding:10px 0 0 0;font-size:9px;color:#666;} #tw a{color:#444;} .sp{font:bold 13px Helvetica,Arial,sans-serif; letter-spacing:-1px;} .hate,.hate a{ color:#0074AE;} .love,.love a{ color:#FF0071;} .like,.like a{ color:#a9519d;} .dislike,.dislike a{color:#6061a5;} #bar{height:20px;} #bar .love,#bar .hate{position:absolute;} #bar .love {left:960px;padding-right:35px;padding-top:5px;height:20px;background: transparent url(/attach/e.png) no-repeat scroll right -25px;} #bar .hate {left:0;padding-left:35px;padding-top:5px;height:20px;background: transparent url(/attach/e.png) no-repeat scroll top left;} #cursor {position:absolute;z-index:10;left:490px;height:25px;width:25px;background: transparent url(/attach/e.png) no-repeat scroll left -50px;} #cursor span{display:none;} #cursor.play{background-position:0 -100px;} #cursor.pause{background-position:0 -75px;} #tw a.u{padding:1px 2px; background-color:#f2f2f2;} #tw a.u:hover{background-color:#444;color:#f2f2f2;} #about { position:absolute;top:3em;left:-2em; transform : rotate(270deg); -moz-transform: rotate(270deg); -webkit-transform: rotate(270deg); /* transform : rotate(90deg); -moz-transform: rotate(90deg); -webkit-transform: rotate(90deg); */ } #about a{color:#ccc; display:block; padding:2px;font-size:1.2em;} #about a:hover{background-color:#ddd;color:#333;}
Pop out
Help
About
×
×