[Greasemonkey] Cannot use GreaseMonkey :-(
Guess Who am I
shiftcode at hotmail.com
Sat Jun 4 12:50:14 EDT 2005
Ok, the link MUST BE a link pointing to a .user.js file !!! I thought it was
a link to the page you want to customize! After reading this document
(http://greasemonkey.mozdev.com/authoring.html), things begins to be
clearest in my mind.
I've been written my first script, which is a basic script to suppress very
agressive ads to caramail.com french site (I am french). This site uses
flashing objects into a vertical and an horizontal div. A third moves itself
on the screen while you try to read your mail. AAAARRRRRGGGGHHHHHHHNNNNN.
Here is this script :
// ==UserScript==
// @name CaramailPub
// @namespace http://mdelamare.free.fr
// @description Supprime la pub de Caramail
// @include http://*.caramail.lycos.fr/*
// ==/UserScript==
function DecanterCara(){
tous = document.getElementsByTagName("div");
if(tous.length == 0){
setTimeout(DecanterCara(), 250);
}
liste = "";
for(i=0; i<tous.length; i++){
nom = tous[i].id.toLowerCase();
if((nom.indexOf("ad") > -1) || (nom.indexOf("ban") > -1)){
tous[i].parentNode.removeChild(tous[i]);
liste = liste + " " + tous[i].id;
}
}
GM_log("Recherche parmi " + tous.length + " éléments : " + liste);
}
DecanterCara();
--- End of my script ---
I will write a mini-howto for this script in Caramail forums. In an
interview, webmasters of this site told us that ad were not so present as
they'd like, and does not interfere with navigation into our webmail.
>From: Jeremy Dunck <jdunck at gmail.com>
>Reply-To: greasemonkey at mozdev.org
>To: greasemonkey at mozdev.org
>Subject: Re: [Greasemonkey] Cannot use GreaseMonkey :-(
>Date: Sat, 4 Jun 2005 01:46:55 -0500
>
>On 6/4/05, Guess Who am I <shiftcode at hotmail.com> wrote:
> > Hi, in the Tools menu of Firefox, options "Install user script" and
>"user
> > script commands" are grayed (unavailable). There is no context menu
>entry in
> > the link context menu, and when I use "Manage user scripts" in the Tools
> > menu, clicking on the edit button at the bottom of the window (near
> > "Enabled" checkbox), the window GreaseMonkey window closes itself,
>without
> > doing anything else.
>
>"Install user script" is only enabled when you're currently viewing a
>user script in the window.
>
>"User script commands" is only enabled when a user script has
>registered some commands.
>
>It's normal for the UI to go away when you click edit.
>
>So the only weirdness you're seeing is that you're not getting shelled
>to your text editor when you click "Edit". Do you actually have any
>scripts installed? I notice that if you don't have a user script
>selected in the list on the left, GM behaves the way you describe.
>
>Go to the directory page, view a user script, and see if Install User
>Script becomes enabled:
>http://dunck.us/collab/GreaseMonkeyUserScripts
>
>Here's an example script, for ease:
>http://www.langenhoven.com/code/gsearch/gsearchrate.user.js
>
>And an explanation of what it does:
>http://www.langenhoven.com/code/gsearch/gsearchrate.php
>
>Anyway, once you've installed that, see if the edit button behaves
>like you'd expect.
>_______________________________________________
>Greasemonkey mailing list
>Greasemonkey at mozdev.org
>http://mozdev.org/mailman/listinfo/greasemonkey
_________________________________________________________________
MSN Search : des réponses à tous vos besoins !
http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR
More information about the Greasemonkey
mailing list