The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniWeb General (http://forums.omnigroup.com/forumdisplay.php?f=8)
-   -   Javascript bookmarklet new window problems (http://forums.omnigroup.com/showthread.php?t=5236)

tamaracks 2007-10-21 02:22 PM

Javascript bookmarklet new window problems
 
I use a javascript bookmarklet that works with the del.icio.us client
Pukka. It works similarly to any pop-up del.icio.us boormarklets, only
it creates a pukka url that loads the fields into Pukka. Lately, I
seem to be getting really weird results with this bookmarklet. I can't
tell where the problem lies, but it seems to me that it has to do with
the way OmniWeb is handling Javascript. See below for the bookmarklet
code.

javascript:document.location.href='pukka:url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)+'&extended='+encodeURIComponent(window.getSelection());

Sometimes, OmniWeb gives me an error page saying that javascript is
not a recognized protocol. When that happens, I change one of the
Javascript related preferences under the Security preferences and then
it seems to work.

But other times, the bookmarklet does not work at all. Clicking on it
in my favorites bar produces absolutely no reaction except that the
background of the bookmarklet highlights briefly. It seems like
OmniWeb isn't even trying to execute the Javascript. This problem
appears to be related to specific pages, because other pages will work
except the one that I'm trying to bookmark. Today, one such page is
[url]http://www.interaktion.info/growl-display-style-growlhud/[/url]. I tried
restarting OmniWeb and copying the URL in a new page, but nothing
works.

Other bookmarklets that are supposed to generate a new window also exhibit the same problem on the same pages.

Anybody else experienced this?

troyb 2007-10-25 12:57 PM

We recently fixed a problem that could cause javascript bookmarklets to stop working. If you continue to have this issue though, please let us know!

circumforaneus.wayne 2007-11-19 12:30 AM

my popup-producing bookmarklets don't work in windows with 2 or more tabs
 
This has actually made me switch back to Safari for my default. I like to use bookmarklets to move my windows around, etc, and my handmade javascript bookmarklets simply don't work in a window that has tabs open. They work fine in a 1 tab (i.e. no tab) window. Most of my first 10 favorites (w/ shortcuts) follow this model:
[INDENT]javascript:self.resizeTo(200,200);self.moveTo(0,0);self.resizeTo((screen.availWidth*.5),screen.availHeight);self.moveTo((screen.availWidth/2),0);
[/INDENT]
I also have a Google Bookmarks bookmarklet that creates a popup. It works with a 1 tab (i.e. no tab) window, but if there's more than 1 tab open when I invoke it, the window that should be a popup is instead made into a new tab at the end of the tabs in the window. Much more inconvenient than a popup.
[INDENT]javascript:(function(){var%20a=window,b=document,c=encodeURIComponent,d=a.open(%22http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=%22+c(b.location)+%22&title=%22+c(b.title),%22bkmk_popup%22,%22left=%22+((a.screenX||a.screenLeft)+10)+%22,top=%22+((a.screenY||a.screenTop)+10)+%22,height=420px,width=550px,resizable=1,alwaysRaised=1%22);a.setTimeout(function(){d.focus()},300)})();
[/INDENT]
Is this something I'll have to grin and bear, or could I get these bookmarklets to work the way I want them to

troyb 2007-11-19 08:56 AM

[QUOTE=circumforaneus.wayne;25107]This has actually made me switch back to Safari for my default. I like to use bookmarklets to move my windows around, etc, and my handmade javascript bookmarklets simply don't work in a window that has tabs open. They work fine in a 1 tab (i.e. no tab) window. Most of my first 10 favorites (w/ shortcuts) follow this model:
[/QUOTE]
Under the security preference pane do you have "Allow scripts to resize windows" and "Allow scripts to reorder windows"? Try turning them off and see if the problem continues.
[QUOTE]
I also have a Google Bookmarks bookmarklet that creates a popup. It works with a 1 tab (i.e. no tab) window, but if there's more than 1 tab open when I invoke it, the window that should be a popup is instead made into a new tab at the end of the tabs in the window. Much more inconvenient than a popup.
[/QUOTE]
I'm not sure why this bookmarklet would stop working with multiple tabs open. Perhaps the particular tab you're on has a site preference that is causing problems.

circumforaneus.wayne 2007-11-19 09:08 PM

[QUOTE=troyb;25164]Under the security preference pane do you have "Allow scripts to resize windows" and "Allow scripts to reorder windows"? Try turning them off and see if the problem continues.

I'm not sure why this bookmarklet would stop working with multiple tabs open. Perhaps the particular tab you're on has a site preference that is causing problems.[/QUOTE]

Changing the security prefs doesn't fix it. My window bookmarklets ONLY work if there's only 1 tab. More than 1, the Bookmarks menu flashes when i type the keyboard command-1 through command-4 (set as window bookmarklets), but the window doesn't move an inch.

No, I checked and this bookmarklet doesn't make a popup for any window with multiple tabs open, regardless of the current tab and whether it has site specific preferences set (I checked). And now, it won't make a popup for a single tab window, either--it opens what should be the popup in a new tab.

I get the sense this kind of stuff is only happening to me. Maybe I have too much old junk in my OmniWeb defaults? I know there are some obsolete usernames in there where directories are referenced (I migrated my user account and changed short names, and often wonder if that's the source of any occasional weirdness I encounter).

I'm glad to hear that this is an error and not something that everyone deals with. I'll export my bookmarks to another user account and try it there.

troyb 2007-11-20 08:47 AM

If you do continue having trouble, feel free to send us mail at: [email]omniweb5@omnigroup.com[/email] and we'll try to figure out what's going on :)


All times are GMT -8. The time now is 09:18 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.