News:

My opinion > Your opinion

Main Menu

An Error Has Occurred!

Started by ~, September 29, 2010, 02:22:20 AM

Previous topic - Next topic

~

An Error Has Occurred!

LMNO

Um... Wow.  That is completely alien to me.  I am always impressed with PD.com.  You guys really do show me the limits of my knowledge.  I appreciate that.

Triple Zero

short explanation:

Greasemonkey is a Firefox extension/plugin. It exists since a really long time, sort of like a swiss army knife of plugins, since it allows you to install arbitrary javascript (that's the code B-AI posted) to get executed on a certain selection of webpages (the @include and @exclude lines at the top, which will need to be changed to @include http://www.principiadiscordia.com/forum/index.php?topic=* so it will only run on PD.com)

Javascript can make arbitrary and interactive modifications to a webpage, for example the "Quick Reply" fold-out textbox at the bottom of each thread is done with Javascript.

The difference is that the "Quick Reply" feature is part of the SMF-code, just like the HTML and the stylesheets and theme-images, etc. Meaning that everybody that comes to this page (and is logged in) gets the "Quick Reply" code.
The fun thing about Greasemonkey is that you can install your own code into a website, which is saved locally on your harddisk, and the Greasemonkey extension remembers to execute it when a page matching those particular @include and @exclude -rules loads.

The important part to remember is that the script loads just for you, the user that installed Greasemonkey and the additional script, and not for all the other users of the page (who have no idea since this al happens locally on your computer). That's why they call those scripts "UserScripts", cause they're user-specific.

So this one adds an "ignore" function to SMF. Which is indeed a typical thing that a userscript can do, it just needs to remember who you wanna ignore (uses a cookie for that) and then hide their posts if they appear on the page. I've thought about writing a script just like it many times :) Except this one is probably prettier and easier to use.

Also, it needs to be said, most Greasemonkey userscripts are compatible with Opera userscripts. Opera basically has Greasemonkey built-in, you just put the scripts you want to load in the Opera userscripts directory, and they will get loaded depending on the @include and @exclude rules.



Hey and B-AI, would you pretty-please mind to edit your post and wrap the code in [code] ... [/code] tags? Cause it makes it look so much prettier and stuff ;-)
Ex-Soviet Bloc Sexual Attack Swede of Tomorrow™
e-prime disclaimer: let it seem fairly unclear I understand the apparent subjectivity of the above statements. maybe.

INFORMATION SO POWERFUL, YOU ACTUALLY NEED LESS.