Bookmarklets

S

SLR

Just a quick question regarding bookmarklets.

First off, I know that with bookmarklets, I can execute code on other
people sites. I know that I use them to modify the way I view other
peoples sites. For example lets say, I wrote some basic code:

Javascript:document.getElementById('body').setAttribute(...,....) //
You get the point...

I can then save this as a favorite and have it execute when on any
site.

Basically, its a two step process: I go to a site. Then I have to
execute the bookmarklet that is saved in my favorites.

What I want to know is if there is any way to make this one fluid
motion? What I want to do is basically create a bookmarklet that loads
a page (such as yahoo or google) and applies my custom scripts to it.

Is this possible?
 
S

Scott

Just a quick question regarding bookmarklets.

First off, I know that with bookmarklets, I can execute code on other
people sites. I know that I use them to modify the way I view other
peoples sites. For example lets say, I wrote some basic code:

Javascript:document.getElementById('body').setAttribute(...,....) //
You get the point...

I can then save this as a favorite and have it execute when on any
site.

Basically, its a two step process: I go to a site. Then I have to
execute the bookmarklet that is saved in my favorites.

What I want to know is if there is any way to make this one fluid
motion? What I want to do is basically create a bookmarklet that loads
a page (such as yahoo or google) and applies my custom scripts to it.

Is this possible?

you can try greasemonkey if you use firefox https://addons.mozilla.org/en-US/firefox/addon/748
 
J

Jorge

What I want to know is if there is any way to make this one fluid
motion? What I want to do is basically create a bookmarklet that loads
a page (such as yahoo or google) and applies my custom scripts to it.

Is this possible?

No, ISTM that it's not possible. Because as soon as the browser is
about to load a page, the environment is reset to a fresh, new, clean
one, and that includes trashing the bookmarklet's code/data.
 
S

SLR

No, ISTM that it's not possible. Because as soon as the browser is
about to load a page, the environment is reset to a fresh, new, clean
one, and that includes trashing the bookmarklet's code/data.

Yeah, that's what I'm noticing. I was just hoping there was some work
around.
 
J

Jeremy J Starcher

Just a quick question regarding bookmarklets.

Javascript:document.getElementById('body').setAttribute(...,....) // You
get the point...

I can then save this as a favorite and have it execute when on any site.

Basically, its a two step process: I go to a site. Then I have to
execute the bookmarklet that is saved in my favorites.
Is this possible?

If you are running Firefox, GreaseMonkey will do what you'd like.
If you are at all comfortable in Javascript, its not hard to write
simple GreaseMonkey scripts.

If you are running IE6 or IE7 on XP+ then you can use something called
IE7PRO which has a GreaseMonkey script. I have some very complex scripts
that run, unchanged, in both environments.

Opera has a beta version somewhere, but it doesn't allow saving of any
data. Should work for bookmarklet-type things, but I've got very little
experience with it.

I've read of several people trying to put one together for Konq, but I
have yet to see it.

(Chrome is rumored to have one as well, but it IIRC it was kind of
'hacked' in.)
 
B

BootNic

On Tue, 16 Dec 2008 18:48:18 GMT
Opera has a beta version somewhere, but it doesn't allow saving of
any data. Should work for bookmarklet-type things, but I've got very
little experience with it.

http://www.google.com/search?q=Opera+user+scripts

[snip]


--

BootNic Tue Dec 16, 2008 02:24 pm
If you can learn from hard knocks, you can also learn from soft
touches.
*Carolyn Kenmore*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAklIAIwACgkQylMUzZO6jeIErQCeJEMoBXeLVVyloAVfNSPFFAMm
i1EAn1gDTjgOFu+XIOqyVFSW6KD3r89D
=ksXX
-----END PGP SIGNATURE-----
 
J

Jeremy J Starcher

On Tue, 16 Dec 2008 18:48:18 GMT
Jeremy J Starcher said:
Opera has a beta version somewhere, but it doesn't allow saving of any
data. Should work for bookmarklet-type things, but I've got very little
experience with it.

http://www.google.com/search?q=Opera+user+scripts

[snip]

*nods*

Searching that site reveals no hits for "setvalue" or "GM_setValue." It
may be out of Beta now, but it still isn't complete enough for my uses.

(I have a set of GreaseMonkey scripts that work with a popular web-chat
forum and re-orders or hides a lot of things based upon user
preferences. The ability to save those preferences is essential.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top