/ clippy.html
clippy.html
 1  <style type="text/css">
 2  .clippy {text-align:left; z-index:300;position:absolute;font-family: tahoma, verdana; font-size: 11px;}
 3  .balloon {background: url(//s.4cdn.org/image/bubble.gif); width: 280px; height: 300px;}
 4  .balloon-text {padding: 40px; text-align: left;}
 5  .clippy-img {margin-left: 155px;}
 6  </style>
 7  	<div class="clippy" id="clippybox" style="display:none">
 8  		<div class="balloon"><div class="balloon-text"><div id="clippy-insert-into"> </div><input type="checkbox">Don't show me this tip again</input></div></div>
 9  	<img class="clippy-img" src="//s.4cdn.org/image/Sticky2.gif" />
10  	</div>
11  	
12  	<script type="text/javascript">
13      	var clippy, clippy_text, com, email, filename;
14  		var introtext = "Hello, I'm Sticky, the 4chan assistant.<br/>";
15  		
16  		function idle() {
17  		}
18  
19  		function helpful() {
20  			var text = com.value, etxt = email.value, filetxt = filename.value;
21  			
22  			if (filetxt.search(/[0-9]{12,13}/) >= 0)
23  				clippy_text.innerHTML = "It looks like you're reposting an old image.<br>Would you like help?<br><br><ul><li>Get help posting original content</li><li>Continue killing 4chan by myself</li></ul>";
24  				
25  			else if (filetxt.search(/C:\\WINDOWS\\/i) >= 0)
26  				clippy_text.innerHTML = "It looks like you're posting from your \"hidden\" porn folder.<br>Would you like help?<br><br><ul><li>Get help moving into my own house</li><li>Just live in the basement without help</li></ul>";
27  				
28  			else if (text.search(/MODS=/) >= 0)
29  				clippy_text.innerHTML = "It looks like you're posting \"MODS=FAGS\".<br>Would you like help?<br><br><ul><li>Get help with my anger issues</li><li><a href=\"http://wakaba.c3.cx\">Get help starting my own /b/ ripoff</a></li></ul>";
30  				
31  			else if (text.search(/[a-z]/) == -1 && text.length >= 4)
32  				clippy_text.innerHTML = "It looks like your capslock key is broken.<br>Would you like help?<br><br><ul><li>Get help <a href=\"http://www.ebay.com/\">finding a new keyboard</a></li><li>Just type the post without help</li></ul>";
33  				
34  			else if (text.search(/moar/i) >= 0 || text.search(/lulz/i) >= 0 || text.search(/rule 34/i) >= 0)
35  				clippy_text.innerHTML = "It looks like you're a moron.<br>Would you like help?<br><br><ul><li>Get help <a href=\"http://ninjawords.com/more\">learning to spell</a></li><li>Just type the post without help</li></ul>";
36  			
37  			else if (etxt.search(/sage/) >= 0)
38  				clippy_text.innerHTML = "It looks like you don't like this thread!<br>Maybe you shouldn't read it?";
39  				
40  			else if (text.search(/fag/i) >= 0)
41  				clippy_text.innerHTML = "It looks like you're calling someone a fag.<br>Would you like help?<br><br><ul><li>Get help <a href=\"http://orz.4chan.org/y/imgboard.html\">finding myself</a></li><li>Just type the post without help</li></ul>";
42  				
43  			else clippy_text.innerHTML = "Would you like help with:<br><ul><li><a href=\"javascript:void(com.value='DICK BUTT')\">Trolling</a></li><li>Finding copypasta</li><li>Being arrested</li><li><a href=\"http://www.4chan.org/rules.php\">Complaining about rules</a></li><li>Being wapanese</li></ul>";
44  			setTimeout(idle, 15000);
45  		}
46  		
47  		function remove_listeners(fn) {
48  			com.removeEventListener("keyup", fn, false);
49  			email.removeEventListener("keyup", fn, false);
50  			filename.removeEventListener("keyup", fn, false);
51  		}
52  		
53  		function add_listeners(fn) {
54  			/*com.addEventListener("keyup", fn, false);
55  			email.addEventListener("keyup", fn, false);
56  			filename.addEventListener("keyup", fn, false);*/
57  			com.onkeyup = email.onkeyup = filename.onchange = fn;
58  		}
59  		
60  		function intro() {			
61  			clippy_text.innerHTML = introtext;
62  			clippy.style.display = "";
63  			//remove_listeners(intro);
64  			setTimeout('add_listeners(helpful);helpful();', 3500);
65  		}
66  		
67  		clippy = document.getElementById("clippybox");
68  		clippy_text = document.getElementById("clippy-insert-into");
69  		clippy.style.top = 100+'px';
70  		clippy.style.right = 20+'px';
71  		com = document.getElementsByName("com")[0];
72  		email = document.getElementsByName("email")[0];
73  		filename = document.getElementsByName("upfile")[0];
74  		add_listeners(intro);
75  		
76  	</script>
77