Posts that Junk Blocker is monitoring

Subscribe to Posts that Junk Blocker is monitoring 189 posts found

Jul 26, 2008
lazyttrick 38 posts

Topic: For anybody having scope issues with GM_xmlhttpRequest

bump for relevance...

another option is

while(foo){
    request(a, b);
}

function request(a, b){
   GM_xmlhttpRequest({
        method:'GET',
        url:"http://...",
        onload: doIt(a,b)
   });
}

function doIt(a,b){
   //...
}

 
Jul 24, 2008
Johan Sundström 23 posts

Topic: Standard Function Library

alien_scum: I'd suggest renaming your xpath + css bastard (negative tonal value not really indentional, though I'd avoid that cross-breed myself) to something else; $xc, for instance.

It's a caustic tool to encounter for any seasoned XPath hacker, as it would mercilessly kill stuff like $X('//h1[.="Introduction"]'), as . is used the same way in XPath as in a unix path, for "current node", unlike in CSS.

I keep my own standard library of GM helpers here, by the way: http://ecmanaut.googlecode.com/svn/trunk/lib/gm/ (sorry about the lack of docs; I should blog more of them). For now, it's a treasure chest for those seasoned few that are read/write capable in the JS / DOM world.

 
May 7, 2008
gialloporpora 3 posts

Topic: grab links

I have searched for this problem and I have find this Topic:
http://www.webmasterworld.com/flash/3510424.htm

At the moment browser not support SWF file inserted as data link, I have also tried with Opera and it not support these data linktoo.

It is not a problem relative to Greasemonkey but this is a feature not supported by Firefox.
I think that no browser support this, not only FF.

 
May 6, 2008
gialloporpora 3 posts

Topic: grab links

@alien_scum,
thank you for your suggestion.
I have tried with your method, but unfortunatelly it doesn't work :-(

I have used "The Data Uri Kitchen" to encode SWF file as a string (first in base64 and after with no base64) but it doesn't work.

For the moment, I hav uploaded a second version of my script that use the _clipboard.swf hosted in my site.

Ciao
Sandro

 
May 6, 2008
alien_scum 91 posts

Topic: grab links

I would recommend a data uri, it encodes the flash as a string you can just include in your script. For more information checkout Dive into Greasemonkey.

 
May 6, 2008
gialloporpora 3 posts

Topic: grab links

Dear all,

I have searched for a copyToClipboard function to add in my script and I have found this post.

Since Photobucket Website has a similar function working with Firefox, I have also searched with Google finding this (partial) solution:

http://www.jeffothy.com/weblog/clipboard-copy

I know this is not a "good" solution, it use Flash, but Flash is the most popular plugin,, I think all people have it installed.

My problem, is where to host the file clipboard.swf for these two reasons, I think is a great thing if it could be hosted on userscript.org:
- my site is not very good, sometimes it is down for many hours
- for security reasons, I believe that it is better if the file is hosted in a secure place, like this site.

If this is not possible, no problem I don't insert the copyToClipboard function in my userscript.

Thanks for your attention and excuse me for my english.

Sandro

 
Aug 27, 2007
tlacaelel 2 posts

Topic: grab links

Try saving it to a cookie.
document.cookie = "expires=xxxx;"
document.cookie += "example.com/some.pdf"
?

 
Jul 28, 2007
Descriptor 757 posts

Topic: Updater for your scripts

I wish the site would utilize the @version header, I try to remember to add that, at least something is using it.

 
Jul 28, 2007
JeremyT 19 posts

Topic: Updater for your scripts

Ah, very nice. Yours has a feature that I was hoping to implement and that is parsing the @version part rather than just hosting a version file somewhere.

 
Jul 27, 2007
JeremyT 19 posts

Topic: Updater for your scripts

I thought of this recently: How could a developer keep their users updated with their scripts? Of course, I searched for something like this, and didn't find anything, so here I am.

What I have made is a simple(at least I think so) way to check if the script is outdated. The script is here, as well as the ways to use it. Pick it apart and let me know if this is useful or if I'm just being delusional.

 
Jul 26, 2007
kofifo 14 posts

Topic: document.all

I've read that Firefox added support for document.all, so I didn't get why I got error messages about it . Now I understand.

I like the idea of Mozilla Site Evangelism, but I think I'll stick to just wasting my time for now.

 
Jul 26, 2007
Descriptor 757 posts

Topic: Opera support for greasemonkey scripts

Mortimer said:
Opera supports userscripts (I might say something wrong, but they "introduced" the technology I think)

I would say that's wrong because Mozilla has had this ability since before Opera even had decent JavaScript support. It's just that Greasemonkey has not been around that long. You can even create User Chrome Scripts, which isn't anything new, just the extension is.

 
Jul 26, 2007
Descriptor 757 posts

Topic: Opera support for greasemonkey scripts

I thought of something else to add here, keeping to the subject, I think that one of two things can happen here...

The site can be changed to add some kind of support for Opera User Javascripts - I suspect this won't happen anytime in the near future.

Scriptwrights can go ahead and upload Opera scripts under the following conditions:
Use Greasemonkey metadata and add the statement "This is a Opera / Greasemonkey user script". The metadata should be required anyway.
Only upload Content scripts, UI scripts won't work in Greasemonkey and that isn't what this site is about.
Scripts should be Mozilla Gecko compatible, which should require little or no effort at all, only that it uses ECMAScript and standard DOM methods (i.e. no MS-JScript allowed).

 
Jul 26, 2007
Descriptor 757 posts

Topic: Opera support for greasemonkey scripts

I think if this becomes a popular subject that there should be a 5th topic, something like "Script compatibility; i.e. Opera, etc.".
Or at least in the Banana room, somewhere people can find it without a futile search of the entire forum.
Or is the Banana room just for spammers?

- Odd that sometimes lines don't break.
 
Jul 26, 2007
Descriptor 757 posts

Topic: document.all

You can waste your time forever mucking around with it, or you can actually do something about it. Or do both, or nothing at all.

 
Jul 26, 2007
Joel H 347 posts

Topic: Opera support for greasemonkey scripts

If people are really serious about this, someone could make an Opera Compatibility Script, which would have to be run first, which would patch functions such that opera runs like firefox (as far as the scripts are concerned, that is). Naturally, it would be necessary to control the order of execution of Opera scripts, and I don't know enough to comment on that.

-Joel

 
Jul 26, 2007
Descriptor 757 posts

Topic: Opera support for greasemonkey scripts

I don't mind making a GM Script Opera compatible if someone requested it, but someone needs to post more information than what is available on the Opera site. I know a little about this because I used to use Opera years ago when it didn't have full CSS and JavaScript support and I think there was an Opera news group where we discussed these issues. It was always annoying for me to find out something didn't work - like trying to replace embed with object and thinking I found a solution then I'd find out that Opera didn't support it correctly either.
And now I have a script that uses watch() but Opera doesn't support that. So someone that knows needs to start a thread that shows alternative code for these unsupported methods. I, for one, don't want to go to the trouble to install Opera just to test alternative functions to make a script that I wrote for myself work for someone that uses a different browser that doesn't use Greasemonkey so that they can use it as well. That doesn't make much sense does it?

 
Jul 26, 2007
LouCypher 208 posts

Topic: document.all

Nice finding, kofifo. Try this: document.all.user.js

And BTW, Firefox supports document.all if the page is in quirks mode. Open these pages before installing the above script to test it:

Open the second page again after you install the script.

 
Jul 25, 2007
ries 2 posts

Topic: Automatic search and replace in URL

Excellent! That's exactly what I needed, thank you very much Jeremy!

(and sorry for my late reply, I was cut off the internet (still am but writing this at a friend of mine) so I didn't have a chance to thank you)

 
Jul 25, 2007
kofifo 14 posts

Topic: document.all

I found this:
http://webfx.eae.net/dhtml/ieemu/allmodel.html
but I get an error: "HTMLDocument.prototype has no properties"

 
Jul 25, 2007
jheiselman 7 posts

Topic: Opera support for greasemonkey scripts

Ahh, haven't been logged out in a while. Perhaps a FAQ section would be best, or the modifications to include browser compatibility so that this site can be about user scripts as opposed to GM scripts.

 
Jul 25, 2007
Descriptor 757 posts

Topic: Opera support for greasemonkey scripts

I didn't remember seeing anything either, a while back when we discussed this before, but if you log out it does say:

This site is a repository to download and install Greasemonkey scripts.

'Nuf said.

 
Jul 25, 2007
Joel H 347 posts

Topic: document.all

LouCypher,

It appears you are correct. I googled "greasemonkey unsafedocument" and it sent me here:
http://www.oreillynet.com/pub/a/network/2005/11...

which referred to an object called unsafeDocument, but I didn't bother to check that it exists. Perhaps this is a deprecated object. I can say that I just tested it and the object is not defined. Thanks for catching my error.

-Joel

 
Jul 25, 2007
LouCypher 208 posts

Topic: document.all

There's no unsafeDocument object in Greasemonkey. Perhaps you mean unsafeWindow.document.
Even that won't work with document.all because it's an IE native function, not from the document itself (not declared from the document's script).
Other example, you can't use unsafeWindow.external.addFavorite because window.external.addFavorite is IE specific and Firefox/Gecko (not Greasemonkey) doesn't recognize it.

 
Jul 24, 2007
Joel H 347 posts

Topic: document.all

unsafeWindow is to the window object as unsafeDocument is to the document object. As such, I'm assuming that tricks like document.all[] will work the same with unsafeDocument.all[]

-Joel