Forum Posts

53159 posts

Nov 17, 2007
Ledviper 2 posts

Topic: Ideas and script requests / removing frames

i have no idea what im doing with greasemonkey, but all i want to do is remove the frame called "top_frame". just making that frame take up 0px would be nice too, but i don't know how to change it from saying one thing to another in GM

the page,shown very simply, would look like this:
<frameset>
<frame src="page1">
</frame><frame src="page2">
</frame></frameset>

and i would need the entire the contents of the .js file because, again, i have no idea what i'm doing.

 
Nov 17, 2007
Yansky 848 posts

Topic: Script development / YouTube stop video download

Hi, thanks for this Snippet. Did you realize a working script?I think, we need 2 more things:- a Play-Button- a progress bar

http://userscripts.org/scripts/show/13955

 
Nov 17, 2007
Descriptor 851 posts

Topic: Userscripts.org discussion / Deleting a comment..

I think we should be able to delete our own comments only. Consider for example...
You edit a comment on page 5 - no one will see it or have any way of knowing it was edited.
You add a comment to someone else's script that warns users that it is a security risk - the script owner deletes your comment.
You delete a comment that you made a mistake in - you replace it with a new comment and everyone sees it because it's on top, this is what we want.

Deleting spam is another issue I think, which is something I already commented on.

 
Nov 17, 2007
Descriptor 851 posts

Topic: Script development / onerror detection

DOMNodeInserted should definitely work, I don't know exactly what you are doing and I never tried it on tables, but it does fire when a dom node is inserted.
But the innerHTML method does not fire DOMNodeInserted at all, which, when I think about it, I wouldn't expect it to. That would have been useful in one of my scripts, but the site uses innerHTML which I would like to detect, but that method itself doesn't seem to fire anything at all.
However DOMNodeRemoved does detect when elements are removed because of using innerHTML.
Here's some example code.

function trackNodeInserted(e){
  e.relatedNode.title += " target = " + e.target.nodeName + ",";
}
document.addEventListener("DOMNodeInserted", trackNodeInserted, true);
var thetest = document.getElementById("header");
thetest.innerHTML = "<b>replaced header with this innerHTML</b>";
thetest.textContent = "replaced header with this text content";

 
Nov 17, 2007
Descriptor 851 posts

Topic: Script development / GM_xmlhttpRequest referer not passing?

I haven't tried just using XMLHttpRequest, maybe it works different, or maybe it does the same thing, it's worth a try.

Another thing you might want to know: when using GM_xmlhttpRequest the browser caches the requests (at least SeaMonkey does). The first request shows up in the logs but successive requests do not until the browser cache is emptied, then the first request will show again. Normally I would see a 304 (page not modified), but I didn't even see this. I even tried setting headers for caching, which I forget now, but it wouldn't matter if the browser is just pulling it out of the cache.
I know this doesn't help in sending a referrer, just thought you'd like to know.

 
Nov 16, 2007
Marti 3981 posts

Topic: Userscripts.org discussion / Deleting a comment..

I seconded the motion suggested in that ticket.

 
Nov 16, 2007
gimmic 4 posts

Topic: Script development / GM_xmlhttpRequest referer not passing?

I have posted a bug request here: https://www.mozdev.org/bugs/show_bug.cgi?id=18104

It really was a key part of a test script I was making, quite annoying.
Can you think of any workarounds?

 
Nov 16, 2007
tommygunner 3 posts

Topic: Ideas and script requests / combatgrounds

could someone make me or teach me how to make a script which will tell me how much of each weapon i can buy, kinda like the evo+ script if you've seen it

 
Nov 16, 2007
MrWayne 2 posts

Topic: Userscripts.org discussion / What am I missing?

I am using a script for lynda.com I can tell that the mov is downloading, but I never see any "save as" dialog, and I can't locate the mov through search and find. What am I missing? I feel so dumb.

Thanks so much.
Wayne

 
Nov 16, 2007
gollum 183 posts

Topic: Script development / Image replacement before original loading

Not sure if I understand exactly what you're after...

1. Maybe you could remove the node and inserting another with your specs

2. Set an eventListener "DOMAttrModified" on the .src element and watch for (and block/replace) the address.

 
Nov 16, 2007
znerp 1589 posts

Topic: Userscripts.org discussion / Deleting a comment..

I don't believe that this is possible yet, although after a quick search, I see that a ticket has been created for this to be implemented.

 
Nov 16, 2007
Freeze 48 posts

Topic: Userscripts.org discussion / Deleting a comment..

How do I delete a comment, or edit it at least?

I posted a comment in response to a question on a script and I had forgotten that the code I was using was on one line, so now the whole page is stretched out.

Am I stuck with this for now?

 
Nov 15, 2007
Shilosh 1 post

Topic: Script development / Switch to Gmail's old version

Hi, I'm using a script (GmailRTL which add buttons to write from right to left http://userscripts.org/scripts/show/10023) that works only in Gmail's old version.
Can someone please tell me how do I write a script that automatically opens Gmail in the older version (there is a button in the upper right corner of Gmail).

 
Nov 15, 2007
znerp 1589 posts

Topic: Script development / new user script - doesn't prompt for file

To set your editor, what you need to do is open about:config and filter for 'greasemonkey'. The top value for this should be greasemonkey.editor. Right click this value, click modify and then type the location of your text editor, eg "C:\Windows\Notepad.exe". If this is set correctly, then it should pop up the next time that you try to create a new script.

 
Nov 15, 2007
xonj 1 post

Topic: Script development / Image replacement before original loading

Hi,

I've written a rudimentry ad blocking script and it works great with the exceptions that the original ads are still downloaded, before being replaced.

In my script I use the code element.src=whatever.

My understanding was that the script was run before any links/dependancies were followed on the page?

How can I change/correct this behavior?

Thanks!

 
Nov 15, 2007
ihdavis 4 posts

Topic: Script development / new user script - doesn't prompt for file

znerp - thanks! you said that when I select new user script it, it should popup my editor. it doesn't; how do I make it do that? it'd be nice to use that, as it will insert some text at the top.

thanks!

 
Nov 15, 2007
Robert Andrews 26 posts

Topic: Ideas and script requests / Gmail - delete msg from msg list

I want to be able to delete messages really quickly - without clicking to view them and without having to tick them for a dropdown selection.

So can anyone knock something up to allow deletion right from the message list?

And come to think of it - why not more actions - like applying labels?

 
Nov 15, 2007
JD2066 6 posts

Topic: Userscripts.org discussion / Script Install Not Picking Up Metadata

Do you have any idea on how to make the name 9 characters?
If I shorten it to 9 characters I get something like "GFSWinFix" which would give no clue to someone looking as to what the script does.

 
Nov 15, 2007
Descriptor 851 posts

Topic: Userscripts.org discussion / Script Install Not Picking Up Metadata

Well, 39 is still 30 more than it needs to be.
I was a bit wrong about the name - Greasemonkey removes the spaces from the filename, but uses the meta value in the menu, the configuration files is another story. Apparently you've discovered two of the problems with spaces.

 
Nov 15, 2007
JD2066 6 posts

Topic: Userscripts.org discussion / Script Install Not Picking Up Metadata

It appears the name is 39 characters long.
Looking on this site though I found a script at http://userscripts.org/scripts/show/9086 that a name as long too and it's install appears to work so I don't think the name is it.
Justin

Edit:
I just updated my script and put the @namespace before @name instead of after @author and now the install works.

Edit 2:
I just updated my script and moved @namespace back to being after @author and it still works.
One the edit I did above I had removed a space the somehow got in front of the metadata so that must have been the problem the whole time, I guess.

Edit 3:
I just did a local test with a space in front and it did the same thing. I have no idea how the space got there but now I know why I could never install script either, as I always copied the same metadata template to each script.

 
Nov 15, 2007
Descriptor 851 posts

Topic: Script development / GM_xmlhttpRequest referer not passing?

No, GM_xmlhttpRequest does not send a referer header (or it is always blank). I assume this is a bug in Greasemonkey, or perhaps it's intentional. I tried searching for info on it but gave up. I did not see it listed here: http://greasemonkey.mozdev.org/bugs.html

 
Nov 15, 2007
Descriptor 851 posts

Topic: Userscripts.org discussion / Script Install Not Picking Up Metadata

I'm sure the name is too long, @name becomes a files name. I would never use spaces myself, I think it's a bad idea. But try a much shorter name - I'm sure you don't want the Greasemonkey context menu being 80 characters wide anyway.

 
Nov 15, 2007
znerp 1589 posts

Topic: Script development / new user script - doesn't prompt for file

I'm not entirely sure what you're trying to do, but it sounds like you're clicking the option on Greasemonkey to write a new user script. If this is the case, then after entering those details it should pop up your editor (which you should have selected to be a text editor) with some lines of text at the top. You can then write a user script using this. This will then be saved in a folder in the Firefox profile directory.

If however you're trying to install a userscript, all you need to do is ensure that Greasemonkey is enabled and then open the .user.js file using Firefox and Greasemonkey should automatically pick up on this and install the script.

To answer your other question, putting * in the includes will mean that a script will run on every page (unless that page is in the excludes).

 
Nov 15, 2007
ihdavis 4 posts

Topic: Script development / new user script - doesn't prompt for file

when i select "new user script" from popup in my firefox, I type in the information then hit OK. it doesn't prompt me to select the location of the .js file. am I doing something wrong?

also, entering * into includes means it'll hit every site, right?

thanks!

 
Nov 14, 2007
JD2066 6 posts

Topic: Userscripts.org discussion / Script Install Not Picking Up Metadata

Hi,
I just tried clicking the install button on my script page to test it at http://userscripts.org/scripts/show/13798 and when the dialog came up, it didn't show the script name or excludes.
I'm posting here as I'm not sure if it's just my computer or if this is happening to other people too.
Justin