[Greasemonkey] Any method to transfer infromation between two pages

esquifit esquifit at googlemail.com
Mon Sep 4 12:26:30 EDT 2006


Disclaimer: I haven't checked the rapidshare.de site, so I do not know
whether my suggestion applies to this case. It only refers to possible ways
for passing around data between pages.

1) The standard way to do that in GM is through GM_setValue/GM_getValue.
2) Another possibility could be using cookies.
3) There is also an old (1999!) trick for passing values between successive
pages loaded into the _same_ window [1] which consists in storing the data
into the "name" property of the window object.  This works in current
versions of IE, I do not have FF here at work to see whether this also hols
for Mozilla and GM.  The article is unfortunately in German, but even if you
can't read it you'll be nevertheless able to follow the examples.  Another
thing you'll have to take into account is that only letters, numbers and "_"
are allowed for window.name, so some ad-hoc escaping might be
necessary (also illustrated in the article below).  The authors says that no
apparent limit exists as to the size of the data that can be passed around,
although it recommends no more that 1K.

[1]
http://aktuell.de.selfhtml.org/artikel/javascript/wertuebergabe/index.htm


2006/9/3, Vikas Pandey <vickyvirgo2k at gmail.com>:
>
> say, I have two rapidshare.de folders.
>
> In one, I have some links already inserted, but now I want to reorganise
> on some basis, so I want to delete those links from first rapidshare
> folder and enter them as such in the second rapidshare folder.
>
> As the site doesn't provide any method for this, I think I can write
> some greasemonkey script that runs on opening the first folder and does
> the copy the links to second folder and deletes them in the first folder.
>
> I am not able to understand how to make a greasemonkey script refer to
> the other folder page when I am in the first folder page.
>
> Any tips are welcome.
>
> thanks.
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>


More information about the Greasemonkey mailing list