List Info

Thread: Introducing a script to manage the Google menu tabs




Introducing a script to manage the Google menu tabs
user name
2006-02-13 01:11:25
On 2/12/06, Jason Schramm <jason.schrammgmail.com> wrote:
> I couldn't get it to display right in the browser. I
use a php script
> to generate the javascript file. I'd be open to doing
that if I could
> figure it out.
>

Generate your response text into a buffer.
Then response redirect to a data: url w/ the response
encoded, and end
it with a js comment.

i.e.
data:text/javascript;charset=utf-8,alert('hi')%3B%2F%2F.us
er.js

See here for details on data: uris.
http
://software.hixie.ch/utilities/cgi/data/data
_______________________________________________
Greasemonkey mailing list
Greasemonkeymozdev.org
http:
//mozdev.org/mailman/listinfo/greasemonkey
Introducing a script to manage the Google menu tabs
user name
2006-02-13 01:39:06
The problem with inline that I ran into was that the file
name was
either having a ? or index.php? in front of it. Also, it
wasn't
getting any includes or excludes in the settings. And the
user script
was getting the content of the page, not the script. Even
though the
page content wasn't output after the script displayed.

-Jason

On 2/12/06, Jeremy Dunck <jdunckgmail.com> wrote:
> On 2/12/06, Jason Schramm <jason.schrammgmail.com> wrote:
> > I couldn't get it to display right in the
browser. I use a php script
> > to generate the javascript file. I'd be open to
doing that if I could
> > figure it out.
> >
>
> Generate your response text into a buffer.
> Then response redirect to a data: url w/ the response
encoded, and end
> it with a js comment.
>
> i.e.
>
data:text/javascript;charset=utf-8,alert('hi')%3B%2F%2F.us
er.js
>
> See here for details on data: uris.
> http
://software.hixie.ch/utilities/cgi/data/data
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkeymozdev.org
> http:
//mozdev.org/mailman/listinfo/greasemonkey
>
_______________________________________________
Greasemonkey mailing list
Greasemonkeymozdev.org
http:
//mozdev.org/mailman/listinfo/greasemonkey
Introducing a script to manage the Google menu tabs
user name
2006-02-13 02:52:20
On 2/12/06, Jason Schramm <jason.schrammgmail.com> wrote:
> The problem with inline that I ran into was that the
file name was
> either having a ? or index.php? in front of it. Also,
it wasn't
> getting any includes or excludes in the settings. And
the user script
> was getting the content of the page, not the script.
Even though the
> page content wasn't output after the script displayed.

This is because Greasemonkey downloads scripts when you
install them,
rather than using the content displayed in the browser.
Since you are
using POST to generate the script, the script downloader is
confused.
Try convert the form to use GET and don't include a
content-disposition header, and see if this solves the
problems.

This also goes to show that REST isn't just a nice way of
doing
things, but actually describes the optimal design of web
services.
_______________________________________________
Greasemonkey mailing list
Greasemonkeymozdev.org
http:
//mozdev.org/mailman/listinfo/greasemonkey
Introducing a script to manage the Google menu tabs
user name
2006-02-13 17:09:34
Ah, I had been wondering about that. So that's why the
Linkification extension 
doesn't affect scripts when you install them.

On 12 Feb 2006 at 21:52, Lenny Domnitser wrote:

> This is because Greasemonkey downloads scripts when you
install them,
> rather than using the content displayed in the browser.
_______________________________________________
Greasemonkey mailing list
Greasemonkeymozdev.org
http:
//mozdev.org/mailman/listinfo/greasemonkey
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )