wu :: forums
« wu :: forums - Help with Greasemonkey »

Welcome, Guest. Please Login or Register.
Nov 28th, 2024, 9:35am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   general problem-solving / chatting / whatever
(Moderators: william wu, Grimbal, Eigenray, SMQ, Icarus, towr, ThudnBlunder)
   Help with Greasemonkey
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Help with Greasemonkey  (Read 839 times)
TenaliRaman
Uberpuzzler
*****



I am no special. I am only passionately curious.

   


Gender: male
Posts: 1001
Help with Greasemonkey  
« on: Sep 9th, 2007, 9:48pm »
Quote Quote Modify Modify

I have learnt a bit of Greasemonkey scripting. I would like to finally write a greasemonkey script for multiple quotes as discussed in one of the earlier threads. But thats quite a bit in the future for me.
 
Before that, to start off, i am trying to write a small greasemonkey script for ignoring users on this forum (the attempt is to not display the posts of that particular user). I just thought it might be a fun project to start with.
 
I was just viewing the source of the generated pages in wu forum and i realise that  
1. i will have to find the anchor tag that has "username=<user>"
2. Go 3 tables up and ignore those tables.
 
Doing 1 is quite easy. I am not sure i have seen an example of 2 yet. Any ideas would be greatly appreciated.
 
-- AI
IP Logged

Self discovery comes when a man measures himself against an obstacle - Antoine de Saint Exupery
Sameer
Uberpuzzler
*****



Pie = pi * e

   


Gender: male
Posts: 1261
Re: Help with Greasemonkey  
« Reply #1 on: Sep 9th, 2007, 10:33pm »
Quote Quote Modify Modify

Oh my gosh!!! Shocked I was just thinking of this today and was googling around if there was any script to do so!! Please do this ASAP... I think lot of us needs it!!   Lips Sealed
IP Logged

"Obvious" is the most dangerous word in mathematics.
--Bell, Eric Temple

Proof is an idol before which the mathematician tortures himself.
Sir Arthur Eddington, quoted in Bridges to Infinity
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Help with Greasemonkey  
« Reply #2 on: Sep 9th, 2007, 11:49pm »
Quote Quote Modify Modify

For the selected table (element) set  
style.display='none';
Or, if you still want to see there was a post there
style.visibility='hidden';
« Last Edit: Sep 9th, 2007, 11:50pm by towr » IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
TenaliRaman
Uberpuzzler
*****



I am no special. I am only passionately curious.

   


Gender: male
Posts: 1001
Re: Help with Greasemonkey   wuForumsIgnoreUser.user.js.txt
« Reply #3 on: Sep 10th, 2007, 1:13am »
Quote Quote Modify Modify

A basic version is ready, which removes posts of a "particular" user at the moment. Its very basic and simple (i mean its hardly 10 lines of code) at the moment. Lot of improvements are possible and i will try to gradually add them to the script.  
 
I am attaching the script with this post. So, you can get some immediate relief, if you catch my drift.
 
-- AI
P.S -> Remove the txt extension
« Last Edit: Sep 10th, 2007, 1:13am by TenaliRaman » IP Logged

Self discovery comes when a man measures himself against an obstacle - Antoine de Saint Exupery
TenaliRaman
Uberpuzzler
*****



I am no special. I am only passionately curious.

   


Gender: male
Posts: 1001
Re: Help with Greasemonkey  
« Reply #4 on: Sep 10th, 2007, 1:24am »
Quote Quote Modify Modify

on Sep 9th, 2007, 11:49pm, towr wrote:
For the selected table (element) set  
style.display='none';
Or, if you still want to see there was a post there
style.visibility='hidden';

Thats a good idea. Infact, i think i should be able to attach a button, where will allow you to see a particular removed post on click. By default, we can keep them hidden. Though, i am not particularly sure of how i am going to do that with greasemonkey, unless it allows me add custom java scripts to the HTML page.
 
-- AI
P.S -> I need ideas though on dynamic addition of ignored users, without manually rewriting script every time. Is it possible to do with greasemonkey?
« Last Edit: Sep 10th, 2007, 1:27am by TenaliRaman » IP Logged

Self discovery comes when a man measures himself against an obstacle - Antoine de Saint Exupery
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Help with Greasemonkey  
« Reply #5 on: Sep 10th, 2007, 1:45am »
Quote Quote Modify Modify

on Sep 10th, 2007, 1:24am, TenaliRaman wrote:
i am not particularly sure of how i am going to do that with greasemonkey, unless it allows me add custom java scripts to the HTML page.
There are ways to do that. I think it's used in the math symbol userscript as well. So you could dig around in that code for inspiration.
 
 
Quote:
I need ideas though on dynamic addition of ignored users, without manually rewriting script every time. Is it possible to do with greasemonkey?
Aside from using cookies, I doubt it. You'd have to make a proper firefox extension.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
Eigenray
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 1948
Re: Help with Greasemonkey  
« Reply #6 on: Sep 10th, 2007, 2:34am »
Quote Quote Modify Modify

Use GM_setValue and GM_getValue.  These variables will appear in about:config under greasemonkey.scriptvals.<namespace>/<name>.<key>
IP Logged
SMQ
wu::riddles Moderator
Uberpuzzler
*****






   


Gender: male
Posts: 2084
Re: Help with Greasemonkey  
« Reply #7 on: Sep 10th, 2007, 5:04am »
Quote Quote Modify Modify

However, the GM_* functions only work under Firefox/NS9 with Greasemonkey; they're not portable to IE, Safari, etc. if that's a consideration.
 
--SMQ
IP Logged

--SMQ

Sameer
Uberpuzzler
*****



Pie = pi * e

   


Gender: male
Posts: 1261
Re: Help with Greasemonkey  
« Reply #8 on: Sep 10th, 2007, 9:20am »
Quote Quote Modify Modify

Small question!! I am not good with this, so how do I go about using it? And by the way you want to actually not use the "actual" username in your attached script just to be politically correct!!  Wink
IP Logged

"Obvious" is the most dangerous word in mathematics.
--Bell, Eric Temple

Proof is an idol before which the mathematician tortures himself.
Sir Arthur Eddington, quoted in Bridges to Infinity
TenaliRaman
Uberpuzzler
*****



I am no special. I am only passionately curious.

   


Gender: male
Posts: 1001
Re: Help with Greasemonkey   wuForumsIgnoreUser1.txt
« Reply #9 on: Sep 10th, 2007, 10:42am »
Quote Quote Modify Modify

I bring to thee my super duper grease monkey script.........
Ok its not super duper, its a tad bit nicer than the earlier version. It will allow you to see some of the removed posts and if you still feel yucky, you can hide them back.
 
 
on Sep 10th, 2007, 9:20am, Sameer wrote:
Small question!! I am not good with this, so how do I go about using it?

1. Remove the txt extension of the file.
[edit]The forum software has renamed the file, the filename should something like <ignore_the_idiots>.js[/edit]
2. If you dont have firefox, get firefox.
3. Install greasemonkey add-on for the firefox.
(Greasemonkey-like softwares do exist for other browsers, but i dont know how well my script works in other browsers)
4. Open my super duper greasemonkey script in firefox. Greasemonkey will ask you whether you want to install this uber script. Click on "yes"(you have no option).
 
Quote:
And by the way you want to actually not use the "actual" username in your attached script just to be politically correct!!  Wink

Oh, that name is just a test example. Replace that with anything you may wish. Roll Eyes
 
-- AI
« Last Edit: Sep 10th, 2007, 10:54am by TenaliRaman » IP Logged

Self discovery comes when a man measures himself against an obstacle - Antoine de Saint Exupery
TenaliRaman
Uberpuzzler
*****



I am no special. I am only passionately curious.

   


Gender: male
Posts: 1001
Re: Help with Greasemonkey  
« Reply #10 on: Sep 10th, 2007, 11:11am »
Quote Quote Modify Modify

on Sep 10th, 2007, 2:34am, Eigenray wrote:
Use GM_setValue and GM_getValue.  These variables will appear in about:config under greasemonkey.scriptvals.<namespace>/<name>.<key>

Hey, neat idea. I will give it a try.
 
on Sep 10th, 2007, 5:04am, SMQ wrote:
However, the GM_* functions only work under Firefox/NS9 with Greasemonkey; they're not portable to IE, Safari, etc. if that's a consideration.

Well, its worth a shot. People can use whichever works for them. Though, they will be losing out on some functionality.
 
(Note : People who maybe expecting this super-duper-reloaded script, dont hold your breath. I am not sure, i can even finish it  Undecided)
 
on Sep 10th, 2007, 1:45am, towr wrote:
Aside from using cookies, I doubt it. You'd have to make a proper firefox extension.

Hmm, would have to look at the APIs. If its easy to do as it is in greasemonkey, i might just give it a shot. (Though, i am not particularly sure how my boss would feel about it Grin)
 
-- AI
IP Logged

Self discovery comes when a man measures himself against an obstacle - Antoine de Saint Exupery
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board