Old/new bookmarklet format

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
geleto
Posts: 7
Joined: Fri Jul 22, 2011 9:18 am

Old/new bookmarklet format

Post by geleto » Sun Oct 14, 2012 10:53 am

Hi,
I need to have a JavaScript in a web page that checks whether the currently running iMacros uses the old or new bookmarklet format.
I thought this would do:

Code: Select all

var div = document.getElementById("imacros-bookmark-div");
if( !div )
    UseNewFormat();
else
    UseOldFormat();
, but apparently this div can only be found from a bookmarklet, not from a page javascript.
geleto
Posts: 7
Joined: Fri Jul 22, 2011 9:18 am

Re: Old/new bookmarklet format

Post by geleto » Tue Oct 16, 2012 9:42 am

So? Is it possible to check which version is running?
My webpage now works with both the old and the new bookmarklet formats, the last remaining bit is to know which one to use.
I'd really appreciate to get some info on this before you roll the new version of iMacros for Firefox, which would break the page for most of my users (it's already broken on Chrome, hope you release a non-beta update soon).
Tom, Tech Support
Posts: 3491
Joined: Mon May 31, 2010 4:59 pm

Re: Old/new bookmarklet format

Post by Tom, Tech Support » Thu Oct 18, 2012 3:59 pm

Hi geleto,

Here's a note from one of the developers:
Those who upgraded to 5.2.1 or 5.3. should already have automatic transformation of bookmarklets embedded on page on the fly. Old version users do use the old format. So if his/her web-server generates a page with embedded bookmarklets, all he/she needs to do is to use old format. I would like to have some links to his/her site to see how it is used/works in order to determine if there is a problem with the on-the-fly transformation.
Regards,

Tom, iMacros Support
geleto
Posts: 7
Joined: Fri Jul 22, 2011 9:18 am

Re: Old/new bookmarklet format

Post by geleto » Fri Oct 19, 2012 9:59 am

So if his/her web-server generates a page with embedded bookmarklets, all he/she needs to do is to use old format. I would like to have some links to his/her site to see how it is used/works in order to determine if there is a problem with the on-the-fly transformation.
It's not the webserver that generates the bookmarklet, it's javascript code on the page itself!

Here's the page ( sorry, there's no english version yet - it's on my todo list ).

Using the old format:
http://geleto.com/noaa.html

Using the new format (also has dormant code to handle a more recent version of the old format):
http://geleto.com/noaa2.html

Just hit the button on the left of the map which says [Прогноза].
I need a way to know which version of the bookmarklet to generate (see the makeBookmarklet function in the second link)

And while you're at it - the Chrome version of iMacros behaves rather erratically with this code - sometimes it stops working at all, sometimes it misses to hit some button... No problems on Firefox.
Post Reply