Help with Bookmarklets
Comments: 18
Movable Type lets you create bookmarklets which you can use to post an entry from another page on the web. You know the ones: select some text, choose “Post to MT” (or whatever you’ve renamed it as) from the bookmark menu and a narrow window appears with the selected text, the URL to the page you want to link to, and the rest of the usual MT editing screen fields and boxes.
Here’s the problem (along similar lines to the dictionary look-up bookmarklet): these don’t work in Chimera or Safari if you’ve disabled pop-ups and I cannot for he life of me figure out how to get them working.
Has anyone figured this out? I’d love to know how to do it.
•••
Posted to MetaStuff • 2003.01.24 (Fri) • 12:38
Comments
Posted by Lauren 2003.01.24, 13:07
i do not know if this will be of any help, because i am not familiar with the browsers you are talking about, nor will i pretend to know anything about macs— but i will tell you what i know.
i have a pop-up blocking program for IE and in order to override it, i hold down shift or control when i click on a link or object that wants to open a new browser window. perhaps there is a similar feature with the browsers you are struggling with.
Posted by jeremy 2003.01.24, 17:18
Hmmm, I have not been able to get the MT post bookmarklet to work in Safari regardless of the pop-up setting. Chimera seems to handle it fine. Did you make any modifications to the code for Safari usage? I had suggested a toolbar button or key command to toggle that pref in Chimera, and was excited when I saw that Safari had a key command (command-k), but continue to be denied the satisfaction I require.
Posted by nils 2003.01.24, 17:59
Safari also doesn’t (at least for me) automatically calculate the correct height when you enter the width (or vice-versa) of a thumbnail in the upload dialog. And yet I’m using it, because of the speedl, the snapback and also because it renders toolbar link titles and window titles correctly in Japanese, unlike IE.
Posted by Chris 2003.01.24, 23:28
To get the MT bookmarklet to work in Safari, replace
t=document.selection?document.selection.createRange()¬ .text:document.getSelection();with
t='';You lose the ability to select and copy text into your entry, but it does work even with popup blocking enabled.
As far as Chimera, I wish I knew. When popup blocking is enabled, bookmarklets that open a new window stopped working in nightly builds a few months ago. There are bug reports filed in Bugzilla, but who knows if it will ever be fixed…
Posted by aaron 2003.01.25, 05:05
I stubmled upon this entry and after a quick bit of tweaking am incredibly happy thanks to Chris.
This was the last thing on my list to make Safari my permanent browser. THANKS!
Posted by jh 2003.01.25, 10:45
Chris — Yowza! That’s pretty good. The lack of selected text in the new window isn’t such a big deal because you can simply use Cmd-` to switch between the original window and the editing pop-up and copy over the quotes you need.
Thanks very much for posting that.
Safari down, Chimera to go….
Posted by Jerry Kindall 2003.01.26, 02:30
What you could try for Chimera is to simply have the bookmarklet open the MT posting page into the current browser window rather than opening a new one. That shouldn’t get stopped by pop-up blocking.
How to do so is left as an exercise for the reader…
Posted by jh 2003.01.27, 22:55
Jerry — I got that happening but found it wasn’t terribly helpful as I often want to grab non-contiguous selections from a page. There must be some way to get it opening in a new tab, however, which would allow flipping back and forth to grab the quotes.
(An aside: in Chimera Cmd-Shift-[ shifts focus to the next tab left of the current one, while Cmd-Shift-] moves focus to the next tab to the right.)
Posted by Xian 2003.02.24, 19:21
I finally figured out how to get bookmarklets to work in Chimera when you have pop-up blocking on. Wonderful it is.
Simply edit you prefs.js in your Chimera profile folder and change the line that reads: userpref(“dom.disableopenclickdelay”, 1000); To read: userpref(“dom.disableopenclickdelay”, 0); Of course. Don’t know why I didn’t think of that.
based on this bugzilla thread.
Posted by Eduardo Arcos 2003.02.25, 02:26
Nice, the problem is that when I close and re-open the browser the “0” value goes back to “1000”
I’m using the 2003021707 which is very stable. I’ll test with the 20 December build and post my impressions.
Posted by jh 2003.02.25, 10:17
Xian —- Very cool. Works perfectly here and gets rid of a major hassle. Thanks for posting that.
Eduardo —- Make sure Chimera-ino (or whatever it’s called) is NOT running when you make the change to the prefs file.
Posted by Xian 2003.02.25, 10:20
Eduardo — I am using the Dec 20 build. So hopefully that works for you.
Posted by Eduardo Arcos 2003.02.25, 15:19
I just re-downloaded Dec 20 build, worked super-nice. Thanks a lot Xian!
Posted by Charles M. Gerungan 2003.05.28, 15:35
Found this on Versiontracker: MT2Safari 1.1.
I’m still setting up my weblog (it’s in Dutch). Just put it in here to avoid getting my e-mail address out.
Posted by jh 2003.05.31, 17:36
Charles —- I got rid of the funky characters, not sure what that was. Text areas accept utf-8, btw
Posted by Jay Allen 2003.07.27, 00:48
I dont know if my trackback went through or not, so Ill leave a comment as well, just in case…
If you would like to regain the ability to capture the text selection, see here: Fixing the MT bookmarklet for Safari
Posted by Seth 2005.04.08, 16:32
So I just installed the latest MT and wanted a bookmarklet. Like you I found it didn’t work, so I tried the text selection thing with no luck. Then I noticed that Safari had replaced several spaces with %20’s. Changing them back to spaces made everything work, even text selection. Only problem I had left was due to Saft redirecting everything to tabs. Solved that one by removing the window width and height declarations from the link. Not as pretty but it works.
Posted by jack 2006.06.22, 12:49
Good list of bookmarklets and tutorials on making them with javascript at:
lavalab.com bookmarklets
Post a comment:
Send This Story to an Enemy
• • •