[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Bookmarklets in Konqueror?
From: Jason Keirstead <jason () keirstead ! org>
Date: 2005-01-28 2:08:34
Message-ID: 200501272208.34564.jason () keirstead ! org
[Download RAW message or body]
On January 27, 2005 08:29 pm, Greg Stark wrote:
> But my version of konqueror doesn't seem to have the minitool thing. I
> can't tell what happened in this bug report in the end after all the
> arguments, did it get included or disabled? What version did it appear in?
For anyone interested.. I have just hacked in a very easy way to add full
javascript: support to Konq. This will make javascript: typed URLs work in
the location bar, and will also let normal bookmarks execute as bookmarklets.
It is a nasty dcop hack but it seems to work fine.
Instructions:
1. Copy the javascript.protocol to your $KDEDIR/share/services directory
2. Copy the javascript.sh to anywhere, and chmod it 755
3. Edit the javascript.protocol file to point at the javascript.sh
That's it!
--
Jason Keirstead
http://www.keirstead.org
["javascript.sh" (application/x-shellscript)]
#!/bin/sh
for konq in `dcop | grep konqueror`; do
for win in `dcop $konq | grep mainwindow`; do
if [ `dcop $konq $win isActiveWindow` == "true" ]; then
myurl=`dcop $konq $win currentURL`;
for widget in `dcop $konq | grep html-widget`; do
if [ `dcop $konq $widget url` == $myurl ]; then
dcop $konq $widget evalJS ${1:11};
exit;
fi;
done;
fi;
done;
done;
["javascript.protocol" (text/plain)]
[Protocol]
exec=/home/jason/javascript.sh "%U"
URIMode=rawuri
protocol=javascript
input=none
output=none
helper=true
listing=
reading=false
writing=false
makedir=false
deleting=false
Icon=irc_normal
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic