Help for surrogate script for data image Google text Search

Ask for help about NoScript, no registration needed to post
fred

Help for surrogate script for data image Google text Search

Post by fred »

hello,

I would please have a workaround (surrogate script with NoScript) for :

http://www.google.fr/search?hl=fr&q=spaceship (example search with pictures available)

For this code (inside web page code) :

Code: Select all

<script>(function(x){x&&(x.src='data:image/jpg;base64,(.../.../.../...)');})(document.getElementById('imgthumb1or2or3or4or5or6or...'));</script>
(I hope that the images are loaded by Google and not directly from my home !)

Example of a link on an image ; Is the ID in the link codes are unique (I have changed here) ? :
http://www.google.fr/imgres?imgurl=http://depblog.weblogs.us/wp-content/uploads/2008/01/spaceship_cg2.jpg&imgrefurl=http://depblog.weblogs.us/tag/spaceships/&h=558&w=1100&sz=215&tbnid=abcdefghijklmnop:&tbnh=76&tbnw=150&prev=/search%3Fq%3Dspaceship%26tbm%3Disch%26tbo%3Du&zoom=1&q=spaceship&hl=fr&usg=__0abcdefghijklmnop-abcdefg=&sa=X&ei=abcdefghijklmnopkrstuvwxyz=abcdefghij
So all images will appear without i am forced to enable JavaScript for http://www.google.fr/ .

Thank you for help ; i have several add-ons that work on the Google page if it's useful to say.
Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 GTB7.1 (.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)
fred

Re: Help for surrogate script for data image Google text Sea

Post by fred »

Hello,

Thank you very much for these two lines Giorgio Maone :D :D :D !

Code: Select all

about:config

noscript.surrogate.googleThumbs.replacement
(function(){var ss=document.getElementsByTagName('script');var s,t,m,id,i;for(var j=ss.length;j-->0;)if(((s=ss[j])&&(t=s.firstChild&&s.firstChild.nodeValue)&&(id=t.match(/\w+thumb\d+/))&&(m=t.match(/['"](data:[^'"]+)/)))&&(i=document.getElementById(id)))i.src=m[1].replace(/\(u[0-9a-f]{4}|x[0-9a-f]{2})/ig,function(a,b){return String.fromCharCode(parseInt(b.substring(1), 16))})})()

noscript.surrogate.googleThumbs.sources
!^https?://www\.google\.[a-z]+/search
But the local solution does not work with javascript disabled (the goal) !

I do not see images ( http://www.google.fr/search?hl=fr&q=spaceship << == fr example ) :( :shock:

Work if i enable JavaScript with NoScript for "google.fr" or "http://www.google.fr" !

How please to set different sources for lines of sources (without regex "or " i want to say but i hope we can always use wildcard because it's easy to use) ? Thank you.

I use NoScript Version 2.1.0.5rc2, i use Adblock Plus Version 1.3.8a.3007 and Redirector Version 2.5.2(January 30, 2011) and + (191).

Thank you by advance for the fixing of this problem. (i'm not french this week ! shame (ksd))
Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 GTB7.1 (.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)
Post Reply