Post Reply 
Prox affecting code of GM script on installing
Jan. 26, 2009, 04:03 PM
Post: #1
Prox affecting code of GM script on installing
Hello,

This is a little strange;

I have one particular Greasemonkey script, 'YousableTubeFix' from userscripts.org, where Prox+Sidki inserts some extra code into the script during the _installation_ of the script. This causes part of the script to break.

The line which is affected ends up looking as follows; it is the PRX bits that should not be in the script:

var ytHost = window.location.PRXprotocol + "//" + window.location.PRXhost;

Why would this be happening and how can it be avoided on this or maybe other scripts? I've tested both my config settings and the 'oob' config sidki_2009-01-14.ptron.

Thanks for any wisdom,
Lee
Add Thank You Quote this message in a reply
Jan. 26, 2009, 05:00 PM
Post: #2
RE: Prox affecting code of GM script on installing
I don't have Greasemonkey, but apparently it's a remote script that you want to bypass. So find out the script URL (e.g. via log window) and add it - or just the host - to one of the bypass lists.
Add Thank You Quote this message in a reply
Jan. 27, 2009, 02:48 AM
Post: #3
RE: Prox affecting code of GM script on installing
Hello Sidki,

I'm sure you know, but just in case you don't and to give you a little background, Greasemonkey is a Firefox addon which inserts user javascripts into web pages. The script installation typically takes place by clicking on 'Install' on the relevant userscripts.org script page (if you are finding the script on that site) which 'fetches' the script. You are then offered an install prompt in Firefox to install the script into Greasemonkey. You then simply browse to the affected pages/site and the script should be impacting.
(Sorry if you are more than aware of all that; it may appear patronising, but I just wanted to be 100% clear seeing as you hinted not being highly familiar with Greasemonkey)
Smile!

What I am getting at is, is it expected that having Prox in circuit when installing a Greasemonkey script as described above should actually impact on and change the script's code? I can understand potential conflicts once installed and acting on a web page together with Prox, but not on the installation side ... ?
Do you see what I mean? Maybe you do and I haven't seen what you're saying back Smile! (I think I do too many smile emoticons ... it appears insincere .... hmmm ...)
Yes, I can of course put Prox into bypass to install the script which avoids the problem, but I'm wondering why it is happening and if it should be.

From what I can tell, this is the only script and only line of code where I currently have/have ever had this happening, so it doesn't appear to be a big issue. I don't know if other people also have this experience, but I assume they would with this script and same FF version etc

Lee
Add Thank You Quote this message in a reply
Jan. 27, 2009, 05:56 AM
Post: #4
RE: Prox affecting code of GM script on installing
It's simply because sidki's config is filtering javascript files.

You don't need to put prox into bypass mode. Putting the url into the bypass lists will inform prox to not filtering those files.
Add Thank You Quote this message in a reply
Jan. 27, 2009, 09:44 AM
Post: #5
RE: Prox affecting code of GM script on installing
does Greasemonkey simply download a .js file then run it locally after it is downloaded?

if so, bypassing Proxo "while" downloading that .js for it to be stored locally solves the problem, does it not?

let me ask it this way, is this Monkey-thing downloading the .js file ONCE, or over-and-over-and-over?
Add Thank You Quote this message in a reply
Jan. 27, 2009, 11:04 AM
Post: #6
RE: Prox affecting code of GM script on installing
Thanks whenever and ProxRocks.

ProxRocks:
Yes, your first sentence is right. The script is downloaded/installed just once, then saved locally in Greasemonkey in a scripts folder in the FF profile.

I see what you're both saying, and Sidki too. I can see that Prox is going to be looking at and possibly filtering the script both on installing it through the browser as well as on actually using it. ie dependent on the script's originating url and browsed urls when using it live.

I was curious abut this though because I haven't seen it before and seems only to happen on that one line of code, so I was wondering if there is an unexpected specific problem. ie I didn't expect the actual code of the script to be changed and then _saved_ locally as that. Maybe however I should in fact expect this to be a possibilty when installing scripts like this, and as you say, just set up a relevant exception for the orignating url / temporarily go into bypass.

Lee
Add Thank You Quote this message in a reply
Jan. 27, 2009, 05:56 PM
Post: #7
RE: Prox affecting code of GM script on installing
Regarding the bypass list alternative, the IncludeExclude-U entry would be:
Code:
userscripts.org/scripts/source/            $SET(0=a_web.)


BTW, Opera does a similar thing: regularly fetching a remote script, then running it locally.
Hence the IncludeExclude entry:
Code:
[^.]+.opera.com/servicefiles/            $SET(0=a_web.)
Add Thank You Quote this message in a reply
Jan. 27, 2009, 07:01 PM
Post: #8
RE: Prox affecting code of GM script on installing
Great, thanks Sidki.
Mystery solved I guess !

I hadn't yet investigated specifically which filters wre impacting but presumably, as your line shows, it is best to just bypass all the web filters.
Maybe I can also do that for one or two other sites where I currently just use a total bypass list entry to get some updating connections to work. I'll look into it.

Typically I have resorted to highly basic and generic bypass list entries such as
*domain.*
The use of the star is pretty much the only url matching expression character I have semi grasped.
Smile!

Lee
Add Thank You Quote this message in a reply
Jan. 27, 2009, 07:21 PM
Post: #9
RE: Prox affecting code of GM script on installing
A similar thing might occur with the styles for Stylish for firefox, it downloads style files to change the appareance of many webs.

Maybe someone wants to add also :
Code:
http://userstyles.org/styles/*.css            $SET(0=a_web.)
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: