DevNetworks useful Greasemonkey Scripts

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

DevNetworks useful Greasemonkey Scripts

Post by Chris Corbyn »

Latest GM version (at last edit): 0.6.6
--------------------------------------------------------------

Any Greasemonkey scripts posted in this thread should be intended for use on this forum only. Please post in Code Snippets for anything else

For those who don't know, Greasemonkey is an extension for Firefox which allows you to manipulate web pages whilst viewing in your browser, using your own JavaScript.

To use any scripts posted here we strongly reccommend you use the lastest version of Greasemonkey with its recommended version of Firefox.
Last edited by Chris Corbyn on Sun Jan 01, 2006 8:26 pm, edited 2 times in total.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

RTM Conversion

Post by Chris Corbyn »

http://w3style.co.uk/devnet/function_highlight.user.js

Tested with GM 0.6.4 and FF 1.5

Adds a button labeled "RTM-ize" to the Reply, New Post, Quote and Edit forms. Upon clicking the button the message box is scanned for PHP functions and links are generated to point to the manual pages at PHP.net

Functions are expected to have the trailing parens on them and are permitted to contain the argument list.

Example:

Code: Select all

mysql_connect($server, $user, $pass)
mysql_connect($server, $user, $pass)
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Tested on GM 0.6.2 and it fails, so make sure you upgrade.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

It doesn't seem to work on the examples below... (using 0.6.4)

Code: Select all

 
print substr(htmlentities("foo"), 5);
 
print substr(htmlentities("foo"), 5);
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Testing....

====================

It doesn't seem to work on the examples below... (using 0.6.4)

Code: Select all

 
print substr(htmlentities("foo"), 5);
 
print substr(htmlentities("foo"), 5);
=====================

-- Note that it does deliberately evade the

Code: Select all

 tags... (and some other BBCode tags).  What version of FF are you using so I can try it with other versions?  Clicking EDIT on your post then clicking RTM-ize worked for me with 1.5.

EDIT | Minor bug just spotted.... it stops at the first paren when nesting functions... will be fixed.
User avatar
m3mn0n
PHP Evangelist
Posts: 3547
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

testing...


foreach() fwrite() madeupfuncname() mysql_connect() ereg()
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Works fine - very cool ;)
User avatar
m3mn0n
PHP Evangelist
Posts: 3547
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Here is a GM script I found thanks to Weirdan: http://userscripts.org/scripts/show/1667

It automatically places a quickreply button so you don't need to load a page just to reply.

It's great if it's just a quick message and you aren't going to utilize any of the extras such as emoticon inserter, bbcode tag inserters and etc.

Another is: http://userscripts.org/scripts/show/2277

Removes the redirect page and automatically forwards you to your reply on the thread.

It works in conjunction with the quickreply GM script so those two are a great time saver together.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Sami wrote: Removes the redirect page and automatically forwards you to your reply on the thread.
Unfortunately, it breaks the "back" button :(
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Hehe... nice one guys :)
User avatar
m3mn0n
PHP Evangelist
Posts: 3547
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Weirdan wrote:
Sami wrote: Removes the redirect page and automatically forwards you to your reply on the thread.
Unfortunately, it breaks the "back" button :(
It's a sacrifice I'm willing to make.. hehe :)

All I need now is some sort of script to copy something like....
Weirdan wrote: Unfortunately, it breaks the "back" button :(
...into the clipboard automatically so you can paste it into the quickreply. :)
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

or "quick quote" button :)
User avatar
m3mn0n
PHP Evangelist
Posts: 3547
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

Exactly!

I guess for now I'll keep dreaming... I'm no GM developer. =P
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

this extension may come in handy - not as powerfull as BBCode extension, but this one is compatible with Fx 1.5.0.x :)
User avatar
m3mn0n
PHP Evangelist
Posts: 3547
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

this extension may come in handy - not as powerfull as BBCode extension, but this one is compatible with Fx 1.5.0.x
test


...oh wow... man, I'm lovin' this!
Post Reply