Quantcast

Jump to content


Photo

How to Stop the Snow with GreaseMonkey!


  • Please log in to reply
9 replies to this topic

#1 TehHacker

TehHacker
  • 18 posts

Posted 26 December 2009 - 10:58 PM

All Credits to "piouPiouM" of UserScripts.org for making this script.

Source Code:
// ==UserScript==
// @name SnowStorm Killer
// @namespace http://pioupioum.fr
// @description Remove "Snow Storm" effect added by Snowstorm script.
// @version 1.1
// @author Mehdi Kabab
// @include *
// ==/UserScript==
/*
# ***** BEGIN LICENSE BLOCK *****
# Copyright (C) 2008 Mehdi Kabab [url="http://pioupioum.fr/"]<http://pioupioum.fr/>[/url].
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see [url="http://www.gnu.org/licenses/"]<http://www.gnu.org/licenses/>[/url].
#
# ***** END LICENSE BLOCK ***** */

(function(){
 var SnowStormKiller = function() {
 const NO_SNOWSTORM = -1, SNOWSTORM_12 = 0, SNOWSTORM_13 = 1;
 var s;

 function checkScript() {
 var ret = NO_SNOWSTORM;
 
 if ('function' == typeof unsafeWindow.SnowStorm)
 {
 // Detect version 1.2
 if ('function' == typeof unsafeWindow.snowStormInit)
 {
 ret = SNOWSTORM_12;
 }
 // version 1.3
 else
 {
 s = unsafeWindow.snowStorm;
 
 if ('object' == typeof s && 'function' == typeof s.stop)
 {
 ret = SNOWSTORM_13;
 }
 }
 }
 
 return ret;
 }; // checkScript

 function forceReset() {
 unsafeWindow.SnowStorm = function() {};
 }; // forceReset

 function process() {
 var flakes = s.flakes, h;
 
 if (0 === flakes.length)
 return;
 
 s.stop();
 
 h = flakes[0].o.parentNode;
 for (var i = 0, f; f = flakes[i++]<img src='http://www.neocodex.us/forum/public/style_emoticons/<#EMO_DIR#>/wink.gif' class='bbc_emoticon' alt=';)' />
 {
 h.removeChild(f.o);
 }
 
 s = unsafeWindow.snowStorm = undefined;
 forceReset();
 }; // process

 return {
 init: function() {
 switch (checkScript())
 {
 case SNOWSTORM_13:
 process();
 break;
 case SNOWSTORM_12:
 forceReset();
 break;
 case NO_SNOWSTORM:
 default:
 return;
 }
 } // init
 };
 }();

 SnowStormKiller.init();
})();
Download:

http://userscripts.o...e/39351.user.js

Edited by TehHacker, 26 December 2009 - 10:59 PM.


#2 MasterJunpei

MasterJunpei
  • 453 posts

Posted 26 December 2009 - 11:33 PM

nice script, though i think the single mouse click occasionally would do the trick too :D

#3 Icey Defeat

Icey Defeat
  • 8298 posts


Users Awards

Posted 26 December 2009 - 11:37 PM

except I apparently fail and can't use greasemonkey right because this god damn blizzard is still occurring!


Ya wtf me 2. It feels like its going faster now.

#4 Morrigan

Morrigan
  • 66 posts

Posted 26 December 2009 - 11:41 PM

Huh. It's working fine for me.

nice script, though i think the single mouse click occasionally would do the trick too :D


Except for those of us whose upstairs computer is a clunker and often freezes up before getting anywhere near the bar.

#5 Vexage

Vexage
  • 191 posts

Posted 27 December 2009 - 01:12 AM

This = awesome. Thanks dude.

#6 fruityone

fruityone
  • 346 posts

Posted 27 December 2009 - 04:01 AM

What's wrong with the nice snow? :( I hope they don't get rid of it till after new years.

#7 xZel

xZel
  • 463 posts

Posted 27 December 2009 - 09:03 AM

And the snow is gone! :) thanks!

#8 TehHacker

TehHacker
  • 18 posts

Posted 27 December 2009 - 11:02 AM

Most of the time it would lagg the hell out of my computer before I could even move my mouse over the "stop snow" button.

#9 philywilly

philywilly
  • 1656 posts

Posted 27 December 2009 - 03:13 PM

Aaah, thank you! It was so annoying and with my not-so-up-to-date computer it kind of slowed down things.

#10 ToxicS

ToxicS
  • 2580 posts

Posted 28 December 2009 - 11:39 PM

Firefox 3.7 doesn't let greasemonkey work D:


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users