What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » Forum & Website » Post your greasemonkey scripts

Post your greasemonkey scripts
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. Post your greasemonkey scripts
Just as the thread title says.

This will add Inivisible mode options to the header:

[Image: attachment.php?pid=975323]

Javascript code:
// ==UserScript==
// @name           Plus! Forum
// @namespace      http://shoutbox.menthix.net/*
// @include        http://shoutbox.menthix.net/
// ==/UserScript==
 
var vsubmit = '3a794272e7ed125a'; // needs to be changed to your validsubmit id from the usercp.php page.
var option_on = 'invisible=yes';
var option_off = 'invisible=no';
 
var url = 'http://shoutbox.menthix.net/usercp.php';
 
addInvisibleMode ( );
 
// Functions
 
function addInvisibleMode () {
    with ( getId ( 'contentheaderright' ) )
    {
        innerHTML += '<br />Invisible Mode <a href="#" OnClick="javascript:ajax ( \''+url+'\' , \'action=do_options&validsubmit='+vsubmit+'&'+option_off+'\' );">on</a> / <a href="#" OnClick="javascript:ajax ( \''+url+'\' , \'action=do_options&validsubmit='+vsubmit+'&'+option_off+'\' );">off</a></form>';
    }
}
 
function getId ( id ) { return document.getElementById ( id ); }
 
unsafeWindow.ajax = function ( url , params ) {
    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open('POST', url, true);
    xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlhttp.onreadystatechange=function() {
        if ( xmlhttp.readyState === 4 && xmlhttp.status === 200 ) {
            window.location.reload();
        }
    }
    xmlhttp.send( params );
}


First time making a GM script

.png File Attachment: contentheaderright.png (5.13 KB)
This file has been downloaded 505 time(s).

This post was edited on 09-22-2009 at 07:44 PM by matty.
09-22-2009 07:40 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Post your greasemonkey scripts - by matty on 09-22-2009 at 07:40 PM
RE: Post your greasemonkey scripts - by WDZ on 09-22-2009 at 08:17 PM
RE: Post your greasemonkey scripts - by Mnjul on 09-22-2009 at 08:24 PM
RE: Post your greasemonkey scripts - by matty on 09-22-2009 at 08:28 PM
RE: Post your greasemonkey scripts - by WDZ on 09-22-2009 at 08:32 PM
RE: Post your greasemonkey scripts - by andrey on 09-22-2009 at 09:07 PM
RE: Post your greasemonkey scripts - by toddy on 09-22-2009 at 10:49 PM
RE: Post your greasemonkey scripts - by WDZ on 09-23-2009 at 12:14 AM
RE: Post your greasemonkey scripts - by Chris4 on 09-23-2009 at 01:47 AM
RE: Post your greasemonkey scripts - by WDZ on 09-23-2009 at 01:54 AM
RE: Post your greasemonkey scripts - by Chris4 on 09-23-2009 at 02:08 AM
RE: Post your greasemonkey scripts - by toddy on 09-23-2009 at 02:12 AM
RE: Post your greasemonkey scripts - by NanaFreak on 09-23-2009 at 02:15 AM
RE: Post your greasemonkey scripts - by WDZ on 09-23-2009 at 02:54 AM
RE: Post your greasemonkey scripts - by matty on 09-23-2009 at 01:14 PM
RE: Post your greasemonkey scripts - by Nathan on 09-23-2009 at 06:58 PM
RE: Post your greasemonkey scripts - by -dt- on 09-24-2009 at 05:54 AM
RE: Post your greasemonkey scripts - by MeEtc on 09-24-2009 at 05:49 PM
RE: Post your greasemonkey scripts - by andrey on 09-30-2009 at 05:55 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On