MAemilius

aVo Forum Shoutbox Enhancements

Oct 7th, 2012
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.84 KB | None | 0 0
  1. Quick note to Chrome users. Chrome strips the beginning "javascript:" when pasted into the omnibox. THIS MUST BE THERE OR THE CODE WILL NOT WORK. So, after pasting the code, hit the Home key and type, minus quotes, "javascript:" before hitting Enter. Making the code a bookmark (which you should do), bypasses this problem.
  2.  
  3. Paste the following into your address bar:
  4.  
  5. javascript:var shoutboxUtilities=function(){function g(){b=requestAnimationFrame(g);h()}function h(){for(var a=0,b=$$("#shoutbox-shouts .name span");a<b.length;a++){var c=b[a];var d=c.getStyle("color").match(/rgb\((\d+),\s?(\d+),\s?(\d+)\)/);if(d&&d.length==4){var e=0;if(d[2]==0&&d[3]!=0){e=3}else{for(var f=1;f<4;f++){if(d[f]!=0){e=f;break}}}if(e!=0){d[e]--;if(d[e]<0)d[e]=0;if(e==3)e=0;d[e+1]++;if(d[e+1]>255)d[e+1]=255;c.setStyle({color:"rgb("+d[1]+", "+d[2]+", "+d[3]+")"})}}}}(function(){var a=0;var b=["ms","moz","webkit","o"];for(var c=0;c<b.length&&!window.requestAnimationFrame;++c){window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"];window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"]}if(!window.requestAnimationFrame)window.requestAnimationFrame=function(b,c){var d=(new Date).getTime();var e=Math.max(0,16-(d-a));var f=window.setTimeout(function(){b(d+e)},e);a=d+e;return f};if(!window.cancelAnimationFrame)window.cancelAnimationFrame=function(a){clearTimeout(a)}})();var a=0,b=0,c=500,d={},e=$("shoutbox-refresh-button");if(!shoutboxUtilities){$("shoutbox-refresh-button").parentElement.insert({bottom:"<div style='display: inline-block' class='input_submit alt'>Height: <input value='' style='width: 35px; border: 1px solid #888; color: #CCC; background: #111' type='text' id='shoutboxEx-heightIn'></div><div style='display: inline-block; margin-left: 4px;' class='input_submit alt' id='shoutboxEx-rainbowText'>Reading Rainbow</div>"})}ipb.shoutbox._updateShouts=ipb.shoutbox.updateShouts;ipb.shoutbox.updateShouts=function(a){var b=0,c=document.title,d=0;if(a){clearInterval(b);b=setInterval(function(){if(document.title==c){document.title="[New Message!]"}else{document.title=c}if(!document.hasFocus&&d>4||document.hasFocus()){clearInterval(b);document.title=c}d++},5e3)}ipb.shoutbox._updateShouts(a)};ipb.shoutbox.produceError=function(a){var b="app";if(ipb.shoutbox.global_on){if(ipb.shoutbox.can_edit&&ipb.shoutbox.mod_in_action){b="editShout"}else{b="glb"}}else if(ipb.shoutbox.in_prefs){b="myprefs"}else if(ipb.shoutbox.in_mod){b="moderator"}else if(ipb.shoutbox.in_archive){b="archive"}if(ipb.shoutbox.errors[a]){a=ipb.shoutbox.errors[a]}if($("shoutbox-inline-error-"+b)){$("shoutbox-inline-error-"+b).update(a).show();var c=2e3;if(a.match("Shout flooding is enabled.")){var d=a.match(/\d+/)[0],e=0;e=setInterval(function(){d--;$("shoutbox-inline-error-"+b).update(a.replace(/\d+/,d));if(d==0){clearInterval(e)}},1e3);c=d*1e3}setTimeout("$('shoutbox-inline-error-"+b+"').hide()",c)}else{alert(a)}};var f=$("shoutboxEx-rainbowText");f.on("click",function(){if(b==0){d.startCyclingColor()}else{d.stopCyclingColor()}});$("shoutboxEx-heightIn").setValue($("shoutbox-shouts").getStyle("height").replace(/\D/g,"")).on("keyup",function(a,b){if(a.keyCode==Event.KEY_RETURN){d.setHeight(b.getValue())}});d.setInterval=function(b){c=b||c;if(a!=0){d.startAutoRefresh()}};d.startAutoRefresh=function(){if(a!=0){d.stopAutoRefresh()}e.setStyle({visibility:"hidden",position:"absolute",top:"-100px"});a=setInterval(function(){e.click()},c);autoRefresh.setStyle({color:"white"})};d.stopAutoRefresh=function(){clearInterval(a);e.setStyle({visibility:"",position:"",top:"-"});a=0;autoRefresh.setStyle({color:""})};d.setHeight=function(a){a=a||132;$("shoutbox-shouts").setStyle({height:a+"px"})};d.startCyclingColor=function(){b=requestAnimationFrame(g);f.setStyle({color:"white"})};d.stopCyclingColor=function(){cancelAnimationFrame(b);b=0;f.setStyle({color:""})};return d}()
Advertisement
Add Comment
Please, Sign In to add comment