Page 1 of 1

Re: NoScript and Morfik forum

Posted: Wed Jun 22, 2011 5:44 pm
by therube
Appears that it either wants JavaScript blocked, or both morfik.com & google-analytics.com Allowed.
(google-analytics.com does not display until after morfik.com is allowed.)

Re: NoScript and Morfik forum

Posted: Wed Jun 22, 2011 5:55 pm
by dhouwn
A surrogate should solve this.

Code: Select all

Error: _gaq.push is undefined

Re: NoScript and Morfik forum

Posted: Wed Jun 22, 2011 6:05 pm
by Giorgio Maone
dhouwn wrote:A surrogate should solve this.

Code: Select all

Error: _gaq.push is undefined
I'm working around it in the default surrogate starting with next build, thanks.
[EDIT]
Ooops, looks like default surrogate already thanks care of _gaq...
Do they actually import GA from the canonical GA site?

[EDIT 2]
OK, I can see what's happening. They call _gaq.push indirectly (_gaq.push.call), therefore __noSuchMethod__ can't help there.

I'm afraid I must explicitly add a push method here...

[EDIT 3]
In fact, the new noscript.surrogate.ga.replacement preference (which works around this issue) will look like this:

Code: Select all

(function(){var _0=function(){};with(window)urchinTracker=_0,_gaq={__noSuchMethod__:_0,push:_0,_link:function(h){if(h)location.href=h},_linkByPost:function(){return true},_getLinkerUrl:function(u){return u},_trackEvent:_0},_gat={_getTracker:function(){return _gaq}}})()

Re: NoScript and Morfik forum

Posted: Wed Jun 22, 2011 7:37 pm
by Giorgio Maone

Re: NoScript and Morfik forum

Posted: Wed Jun 22, 2011 8:48 pm
by therube
Now working without allowing google-analytics.com :-).

Re: [Resolved] NoScript and Morfik forum

Posted: Wed Jun 22, 2011 11:01 pm
by GµårÐïåñ
The surrogate should cripple it and I am not seeing an issue, is there something else going on maybe, like Ghostery, I know it breaks alot of things and you can follow the discussion on that here: Ghostery Blocking Feature Breaks Web Functionality on Many Sites.

If you realize it is indeed a Ghostery caused bug, by either disabling it or running in a fresh profile with NoScript only to eliminate other addons as well, then post a comment there and let them know and if not then let us know again.

Re: NoScript and Morfik forum

Posted: Wed Jun 22, 2011 11:51 pm
by al_9x
Giorgio Maone wrote: [EDIT 2]
OK, I can see what's happening. They call _gaq.push indirectly (_gaq.push.call), therefore __noSuchMethod__ can't help there.
Would something like this work as a universal catchall:

Code: Select all

Proxy.createFunction( {get: function(proxy, name) { return proxy; }}, function () {})

Re: NoScript and Morfik forum

Posted: Wed Jul 06, 2011 10:14 pm
by Giorgio Maone
al_9x wrote:versal catchall:

Code: Select all

Proxy.createFunction( {get: function(proxy, name) { return proxy; }}, function () {})
More like this:

Code: Select all

(function() { var p = Proxy.createFunction({get: function(proxy, name) { return name in Object.prototype ? Object.prototype[name] : p }}, function() { return p }) })()