[RESOLVED] ajax.googleapis.com.jqueryui...jquery-ui.css

Proposals for new surrogate scripts, updates/bug fixes to existing ones, tips and tricks to work around the lazy web.
Post Reply
wxman1
Junior Member
Posts: 44
Joined: Tue Dec 08, 2015 8:11 pm

[RESOLVED] ajax.googleapis.com.jqueryui...jquery-ui.css

Post by wxman1 » Tue Dec 08, 2015 8:53 pm

TitanTV is a TV program schedule website. It pretty much works despite NoScript blocking the atypical myriad nonsense crap most web-sites have. However, for specific program detail of any arbitrary program requires scripting provided at ajax.googleapis.com for jquery, jqueryUI and in addition ./1.8.6/themes/base/jquery-ui.css The pop-up automatically disappears on mouseout event. Presently I've an ABE rule that explicitely allows ajax.googleapis.com from TitanTV.

I'd like to have the site blocked - as default - and implement surrogate for those scripts. To this end I've downloaded source copies of all three scripts, and would anticipated implementation of the following surrogate sources to be pretty straightforward:

%APPDATA%\Comodo\IceDragon\Profiles\NS_Scripts\jquery-1.8.3.js
%APPDATA%\Comodo\IceDragon\Profiles\NS_Scripts\jquery-ui_1_8_3.js

That anticipation is predicated upon implementation of the specified environmental variable. If environmental variables can't be used, it would increase the length of the above strings by 200%

However, what about the CSS, i.e., http: [ //ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css], can that be surrogated? If not, then intuitively it would seem I'd have to allow ajax.googleapis.com, the first two .JS would hit on the surrogate, and the CSS would be implemented as an ABE firewall rule?
Last edited by wxman1 on Tue Dec 08, 2015 11:24 pm, edited 1 time in total.
Mozilla/5.0 (Windows NT 5.2; rv:42.0) Gecko/20100101 Firefox/42.0

barbaz
Senior Member
Posts: 9098
Joined: Sat Aug 03, 2013 5:45 pm

Re: ajax.googleapis.com.jqueryui/xyz/themes/base/jquery-ui.c

Post by barbaz » Tue Dec 08, 2015 9:15 pm

wxman1 wrote:However, what about the CSS, [...] can that be surrogated?

Not in NoScript. You need another addon, such as Stylish, and even at that it's not going to be a "surrogate" CSS, there's no such concept for stylesheets AFAIK.

wxman1 wrote:If not, then intuitively it would seem I'd have to allow ajax.googleapis.com, the first two .JS would hit on the surrogate, and the CSS would be implemented as an ABE firewall rule?

Nope, you would have to block the whole ajax.googleapis.com domain by any means (doesn't matter if it's ABE or not) and add the stylesheets as user styles to be applied to the sites you want them applied on. NoScript's script permissions do not affect CSS.

EDIT Or tweak your ABE exception to allow *only* CSS?
*Always* check the changelogs BEFORE updating that important software!
-

wxman1
Junior Member
Posts: 44
Joined: Tue Dec 08, 2015 8:11 pm

Re: ajax.googleapis.com.jqueryui/xyz/themes/base/jquery-ui.c

Post by wxman1 » Tue Dec 08, 2015 9:49 pm

Surrogate not working. I thought I'd blocked ajax.googleapis.com, but I only disabled the ABE specific allow. Once I blocked it in NS, the pop-up doesn't work and I get this in the browser console:

Error loading jquery_183min surrogate: SyntaxError: expected expression, got '%'
%APPDATA%\Comodo\IceDragon\Profiles\NS_Scripts\jquery-1.8.3.js

Error loading jqueryUI_183min surrogate: SyntaxError: expected expression, got '%'
%APPDATA%\Comodo\IceDragon\Profiles\NS_Scripts\jquery-ui_1_8_3.js

ReferenceError: jQuery is not defined
jquery.cookies.js:65:1
Mozilla/5.0 (Windows NT 5.2; rv:42.0) Gecko/20100101 Firefox/42.0

wxman1
Junior Member
Posts: 44
Joined: Tue Dec 08, 2015 8:11 pm

Re: ajax.googleapis.com.jqueryui/xyz/themes/base/jquery-ui.c

Post by wxman1 » Tue Dec 08, 2015 10:03 pm

Error loading jquery_183min surrogate: SyntaxError: illegal character
C:\Documents and Settings\Administrator\Application Data\Comodo\IceDragon\Profiles\NS_Scripts\jquery-1.8.3.js

What illegal character?

:(
Mozilla/5.0 (Windows NT 5.2; rv:42.0) Gecko/20100101 Firefox/42.0

wxman1
Junior Member
Posts: 44
Joined: Tue Dec 08, 2015 8:11 pm

Re: ajax.googleapis.com.jqueryui/xyz/themes/base/jquery-ui.c

Post by wxman1 » Tue Dec 08, 2015 10:14 pm

:ugeek:

Used prefix: file://, and replaced the eval char '\' with / in the local source pathname, and voila! Presto bingo, it works!

8-)

And implementation of environmental vars breaks it due to inherent backslash implemented in enviro vars

:(

EDIT: I downloaded the most current versions of jQuery and jQuery-UI, and replaced the versioning in the source with *.*.*. I'm Golden!

:mrgreen:
Mozilla/5.0 (Windows NT 5.2; rv:42.0) Gecko/20100101 Firefox/42.0

Post Reply