making scripts for opening links in new tab

1,692 views
Skip to first unread message

Damascus

unread,
Jan 9, 2010, 8:52:14 PM1/9/10
to greasemonkey-users
can someone help me make a userscript? i need to add various domains
to it that i would like the links to open in a new tab. and vice
versa another usercript where i add domains to the script which open
links only in the current tab

cc

unread,
Jan 9, 2010, 10:33:39 PM1/9/10
to greasemon...@googlegroups.com
http://wiki.greasespot.net/ is your friend. Particularly
http://wiki.greasespot.net/GM_openInTab, which should do more or less
what you want. (An alternative might be to add target="_blank"
attributes to the links from the script, but I seem to remember I've had
odd problems with that in the past.)

--
cc | pseudonymous |<http://carlclark.mp/>


Damascus

unread,
Jan 9, 2010, 10:39:30 PM1/9/10
to greasemonkey-users
well, i don't have a lot of time to read wiki's and learn scripting
myself, which is why i came here. but i did look at the second link-
should i copy the Example code to a txt file then add to greasemonkey?
also what is the format for adding multiple domains to it?

cc

unread,
Jan 9, 2010, 10:48:42 PM1/9/10
to greasemon...@googlegroups.com
To be honest, if you don't have time to learn how to script, you're not
likely to write good scripts, and you'll go through a lot of needless
frustration. Plus, most of us on the list are interested mostly in
helping others learn, not in writing their scripts for them.

If you do just want a script written fast, give direct requests a try:
just state your exact requirements, including sample pages (URLs
please!) and ask if anyone can write the script for you. You may or may
not get any responses, but it's much more polite than dragging helpful
strangers through the torturous process of teaching an unwilling learner
how to script.

Damascus

unread,
Jan 9, 2010, 11:31:35 PM1/9/10
to greasemonkey-users
yeah i understand the part about not willing to write stuff for
newbies who don't have time to write themselves.

eventually it would be nice to have a larger base of easy-to-find
greasemonkey scripts that are particular to what we need, similar to
Mozilla's addons that are grouped by category and rating. one day
greasemonkey's list of scripts might become so large it might be
optimal to categorize everything, as well as have a real message board
rather than a email group or whatever this is.

esquifit

unread,
Jan 10, 2010, 3:46:36 AM1/10/10
to greasemon...@googlegroups.com
On Sun, Jan 10, 2010 at 5:31 AM, Damascus <cosmic...@gmail.com> wrote:
>
> eventually it would be nice to have a larger base of easy-to-find
> greasemonkey scripts that are particular to what we need, similar to
> Mozilla's addons that are grouped by category and rating. one day
> greasemonkey's list of scripts might become so large it might be
> optimal to categorize everything, as well as have a real message board
> rather than a email group or whatever this is.

It turns out that this database already exists since about five years.
It is called Userscripts.org [1] and it currently contains a couple
of dozens of thousands scripts. The search function is not
particularly elaborated but it works. The scripts are (generally)
tagged (if the script author bothered to do it). Searching for
general purpose scripts however can be kind of a challenge.
The site also features an active forum [2] and within it, a fixed
thread for scripts requests [3].

Regardless of all this, judging by the way you've formulated your
requirement, I'm fearing that your understanding of how Greasemonkey
works or what it exactly does is not altogether correct. As the
previous poster suggested, it would be helpful if you formulated your
requirement from a pure functional point of view. Then others in this
list or in the us.o forum could give advice whether this is possible
with Greasemonkey at all, and eventually come with a hint to a
solution.

[1] Scripts - Userscripts.org
http://userscripts.org/scripts

[2] Forums - Userscripts.org
http://userscripts.org/forums

[3] Ideas and script requests - Userscripts.org
http://userscripts.org/forums/2

Anthony Lieuallen

unread,
Jan 11, 2010, 10:18:53 AM1/11/10
to greasemon...@googlegroups.com
On 01/09/10 23:31, Damascus wrote:
> .. it would be nice to have a larger base of easy-to-find
> greasemonkey scripts..

You mean http://userscripts.org/ ?

Reply all
Reply to author
Forward
0 new messages