Martin Kadlec blogging

Autocomplete for Opera

Yes, I know there is already one and good -> http://userjs.org/scripts/browser/enhancements/ops, but I decided to do my own. My plan was to do something more similar to Firefox's one. And after few hours of work I introduce you Buscomplete (Because Bus is greater than auto :D)

Just download this userJS to your userJS folder, or use userJS manager:
http://files.myopera.com/BS-Harou/files/buscomplete.js

Some more information:
1. Script use localStorage for storing the data, so it's working only in Opera 10.50+
2. You can use Shift+Click to delete item from the list
3. If you are downloading snapshots, sometimes localStorage stops working after installation of new build. You'll have to delete all storage in Opera to make it work.
4. You can use double click on empty field to show all items



Enjoy ;)

EDIT:
I uploaded new version in which you can use arrows up and down instead of CTRL+arrow left/right but I could make some bugs, so if you will find any - please report it!

Extension: http://goo.gl/QSghS

Comments
Please login to post comments.
Avatar
01.11.2011 13:11

Originally posted by TheInvoker:

After the list of the words i have already searched,i have this (at the bottom of the list)
http://imageshack.us/photo/my-images/5/busco.jpg/



interesting, I'll try to fix this :)
Avatar
01.11.2011 12:11
id=is
After the list of the words i have already searched,i have this (at the bottom of the list)
http://imageshack.us/photo/my-images/5/busco.jpg/
Avatar
31.10.2011 20:10

Originally posted by TheInvoker:

id the Google issue a wanted thing or not???



Sorry, I don't understand this sentence. Can you reformulate it a bit please? :)
Avatar
31.10.2011 19:10
OK thanks.....id the Google issue a wanted thing or not??? i remember the first time i installed buscomplete there was no Google things inside.
Avatar
30.10.2011 21:10
why do i see a google search below the list of the words???

Originally posted by BS-Harou:

Originally posted by TheInvoker:

how can we delete the words we don't need anymore?


SHIFT+[Left Mouse click] on item



this doesn't work anymore. the ites are removed only temporary;if i leave the shift button they come back!
Avatar
30.10.2011 21:10

Originally posted by TheInvoker:

this doesn't work anymore. the ites are removed only temporary;if i leave the shift button they come back!



After some time, I'm working ony my extension again. I made update for "Easy user CSS" extension and now I'm workin g on "External Scripts" extension update. After that, I'll hopefully start working on Buscomplete again and look at this problem :)
Avatar
21.03.2011 17:03
This had me puzzled for days:
http://my.opera.com/desktopteam/blog/show.dml/27679592?startidx=200#comment57074712

I wish Opera would do everyone a favor and simply build in autocomplete.
Avatar
06.03.2011 17:03
Dimmy, I see the same thing but just haven't mentioned it before.
Avatar
06.03.2011 16:03
When I fill an input field (say, login) and press TAB to move to the next field (password etc), BusComplete still displays history for the first field, hiding the field where I try to input text now. Only when I use mouse, it behaves correctly.

Can you fix it, BS-Harou? =) Very inconvenient for keyboard-lovers...
Avatar
31.01.2011 12:01
Hi, thanks for useful extension :) .
I noticed one interesting behavior of this extension: when I select 'element' from drop-down and click 'Enter' JS events started (onclick, onsubmit).

Here page where I tested: http://pastebin.com/QW5ReELW .
It's simple html form with attached events. When you try to select some text by 'Enter' key - two events will executed and form will not submitted.
Avatar
11.01.2011 21:01
It's close now. I noticed that manually installing updates the previous one rather than installing a new copy. Now Opera just needs to get autoupdates working, assuming it's a back-end issue. I have seen Lastpass autoupdate, so it's not a universal issue, at least.
Avatar
11.01.2011 06:01
I have been disappointed.
The latest version(1.72) is not yet secure.
Why do not you turn off setting of "Global" by default?
You are jeopardizing a client intentionally.

What you should do now are :
* Withdraw dangerous versions.
* Delete setting of "Global" from the extension.
* Announce for users that a past version is dangerous.

And you should learn more about security of web applications.
Avatar
04.01.2011 14:01
I mean that it is better to use already secure extension than to wait till you publish a secure version for your clients.

Are you aware that you jeopardize your clients?

The simplest method that you have now is to withdraw current insecure version.
Avatar
03.01.2011 12:01

Originally posted by usopion:

We are having already AutoComplete. AutoComplete has solved these problems.


We are having already Firefox so we don't need Opera or Chrome anymore .. I don't think so, concurrency is what makes good products.

Originally posted by usopion:

If you can't understand real problems, you should give up making the extension.


By this logic no one would ever learn anything...

Originally posted by usopion:

More hint: Site's script can publish: iframe.contentWindow.postMessage(foo,"*");


Do you have more "hints" then this? It's easier to solve problems when you know about all potential issues :)
Avatar
02.01.2011 23:01
To my regret, you are understanding little.

If you can't understand real problems, you should give up making the extension.

We are having already AutoComplete. AutoComplete has solved these problems.

More hint: Site's script can publish: iframe.contentWindow.postMessage(foo,"*");
Avatar
02.01.2011 19:01
Another RC with number 4 :zzz:

http://files.myopera.com/BS-Harou/files/Buscomplete1.7rc4.oex

The main events are now secure :)
Avatar
02.01.2011 17:01
RC2: (fixed one error that appeared in err. console and reduced size from 39kb to 14kb :D )

http://files.myopera.com/BS-Harou/files/Buscomplete1.7rc2.oex
Avatar
02.01.2011 17:01
OK. I recognize your effort.

I tried new version, but it did not work. So I checked those source. Maybe I can hack this. This must be not secure.

Hint : HTML event can be camouflaged with dispatchEvent method.

This method is not impossible though it is a little difficult.

It will take long time for you to make a really secure version. At first you should withdraw the insecure version.
Avatar
02.01.2011 17:01

Originally posted by usopion:

Hint : HTML event can be camouflaged with dispatchEvent method.


Well, there isn't any single event that will send you some data. Only way I can imagine how to hack this is to always switch the selected item to lower (keyDown event with arrow down pressed) and then simulate keyDown event with enter pressed and load the item form the input and again and again for each item. Anyway, I didn't study the source of Autocomplete extension, but I think that it's possible to use there same trick to obtain all data. I'll be thinking about how to prevent this in next version, but I will still upload this one because it's securer than v1.6 :)
Avatar
02.01.2011 17:01
Ok, previously mentioned security issue is fixed in rc3 :D (actually not completely but it's again a bit harder to steal the data :) )

http://files.myopera.com/BS-Harou/files/Buscomplete1.7rc3.oex

usopion: I just had an idea, userJS Before/Ater events can't be dispatch by normal javascript right? :)
Avatar
02.01.2011 16:01
And now for the good news :cool:
I've got RC1 of version 1.7. The only new thing is the fact that it should be secure, but I had to make a lot of changes to the script so there might be some bugs.

http://files.myopera.com/BS-Harou/files/Buscomplete1.7rc1.oex

So, enjoy your testing :cheers:
Avatar
02.01.2011 15:01
I had waited that you announce about it. But you did not perform your duty. So I announced warning.

Your extension has jeopardize users. You have the obligation to announce it. Or, you can offer to discontinue publishing this extension to moderators. You are neglecting it.

It is more annoying that this extension diffuses. Or, did you make this extension to steal user's data?
Avatar
02.01.2011 15:01
Firstly, all extensions or userjs that I do I'm doing in my free time. I don't have any profit from it so I don't have any obligation to anyone. My only reason I'm doing all this is that I love opera and I'm trying to make users live easier :)

Secondly, I know there'll be an update with secure version very soon so even if someone will create a real website that will stole data from this extension it will perhaps stole it from 2 users before and that would be just useless.

Originally posted by usopion:

did you make this extension to steal user's data?


This is just ridiculous.
Avatar
02.01.2011 07:01

Originally posted by DanielHendrycks:

Have any of you seen this?


Ooh my gosh, that guy is really annoying :irked:

Anyway, I know about the security problem and I'm working on secure version, unfortunately I didn't have much time during holiday but I think that the new secure version will be uploaded quit soon :)

Fortunately, most people I know doesn't care if someone stoles their few nicknames + I don't think that anyone would care to create some real site that will stole data from one extension of browser with 2% market share :P
Avatar
02.01.2011 03:01
Have any of you seen this?
Avatar
02.01.2011 03:01
Ouch, that seems to be valid ...

... but that is a problem of extensions like this in general, there seems to be no mechanism to "sandbox" extension inputs apart from iframes, what has other issues ...
Avatar
25.12.2010 19:12

Originally posted by BS-Harou:

Interesting idea, but in this case it would be really slow. I store all data in Web SQL database and I would have to test every row separately. Much easier is just to create a SQL regex function


Ah, true.
Avatar
25.12.2010 18:12

Originally posted by Frenzie:

you could just pass it to an input type=email and get the result for the best efficiency



Interesting idea, but in this case it would be really slow. I store all data in Web SQL database and I would have to test every row separately. Much easier is just to create a SQL regex function :)
Avatar
25.12.2010 00:12

Originally posted by BS-Harou:

I do plan to create a feature that will filter items to e-mails only on fields with type=email or name=email.


I was just thinking that rather than writing your own e-mail validating mechanism (fun though it may be) you could just pass it to an input type=email and get the result for the best efficiency. Then again, no way to tell which is faster without trying. Still, seeing if something's a valid-looking e-mail address with a regexp or some such is totally been there, done that. :P
Avatar
24.12.2010 23:12

Originally posted by TheInvoker:

how can we delete the words we don't need anymore?


SHIFT+[Left Mouse click] on item :)

Originally posted by khraom:

Hi How are you? I wonder why the "buscomplete" can not remember "email. " I have several times the respective tests and does not keep. I wonder if whether future versions will do that. Thanks.smile


What do you exactly mean? Buscomplete should remember when you enter your e-mail somewhere (if you know about some page where it doesn't then post it here). I do plan to create a feature that will filter items to e-mails only on fields with type=email or name=email.
Avatar
24.12.2010 22:12
Hi How are you? I wonder why the "buscomplete" can not remember "email. " I have several times the respective tests and does not keep. I wonder if whether future versions will do that. Thanks.:)
Avatar
24.12.2010 22:12
how can we delete the words we don't need anymore?
Avatar
23.12.2010 23:12

Originally posted by BS-Harou:

It's possible in version 1.6

https://addons.opera.com/addons/extensions/details/buscomplete/1.6/?display=en

Go to preferences page and change "Range" to "Per domain" wink

And Merry Christmas!



thanks
Avatar
23.12.2010 20:12
Thanks. Could you advise as to the best way to update? I've never seen Opera's autoupdate actually do it. I don't even know when it's supposed to (daily, when the browser is opened, etc?). There's no "update now" button in Opera, and no word if there ever will be. Perhaps downloading the file and copying it manually to widgets?
Avatar
23.12.2010 20:12

Originally posted by rseiler:

I've never seen Opera's autoupdate actually do it.


Me neither :P

Originally posted by rseiler:

There's no "update now" button in Opera, and no word if there ever will be.


I heard that there might be something very soon.

Originally posted by rseiler:

Could you advise as to the best way to update?


I plan to create export/import option in version 1.7 or 1.8. That will be probably the best way. Currently, I always uninstall the previous version and install the new one. It removes all stored data, but it's good to remove them time to time anyway, so I don't bother so much.
Avatar
23.12.2010 19:12
It's possible in version 1.6

https://addons.opera.com/addons/extensions/details/buscomplete/1.6/?display=en

Go to preferences page and change "Range" to "Per domain" ;)

And Merry Christmas!
Avatar
23.12.2010 18:12
is it possible to display the words i searched for only in the site i made the research??
Avatar
18.12.2010 05:12
I've awaiting for this long-long time
Avatar
13.12.2010 01:12
When selecting a value and pressing tab, it should tab to the next field. Currently it sticks to the current field and I type my password in the wrong place :)

Also, it would be nice if the remembered entries where limited by the field name. So fields named 'email' will only list the emails I've typed in before.

I'm pretty sure this is the behaviour of autocomplete in other browsers.
Avatar
05.12.2010 10:12
Hi, I'm working on some features that should help you with all of this
Avatar
27.11.2010 14:11
can you add segoe ui to the list of fonts, which is default in windows 6+, option default which would be inherit and font sizes in points instead of pixels, so it would be for people to understand with default option for for size which would be inherit as well
Avatar
27.11.2010 14:11
you can write "iherit" instead of font family name and you can also write any font (not only the ones which are in the list). I perhaps add option to select px/em/pt etc...
Avatar
26.11.2010 21:11
Looks nice, seems to work without problems so far. Now I just need some more pages where I can test it :)
Avatar
26.11.2010 18:11
I've uploaded new version, but they probably won't approve it over the weekend, so if you are interest you can download it here:
http://files.myopera.com/BS-Harou/files/Buscomplete.oex

I've added "preferences page" :)
Avatar
23.11.2010 10:11

Originally posted by QuHno:

font-family: 'segoe ui', tahoma, sans, sans-serif !important;


then might be
font-family: inherit !important;
though didn't check it.
Avatar
19.11.2010 23:11
I've found some info on ext. forum, so there might be some update for buscomplete extension soon :)
Avatar
19.11.2010 22:11
From last build Opera finally supports "preferences page" for extensions. I think I will give there an option to set font-family, font-size, number of items before scrollbar appears and editable list of site where the autocomplete should be disabled :)
Avatar
19.11.2010 22:11
but firstly, I have to discover how is the preferences page working)
Avatar
19.11.2010 22:11
Same problem here, I'd really like to update the arc90 script with a settings dialog. I'll look into your code after you have found out how it works ;)
Avatar
19.11.2010 21:11
Think about the Asian users with their multiple different code points. Segoe UI and Tahoma have a quite limited Unicode support. "Lucida Sans Unicode" is installed on >97% of all Windows machines too and has a way better Unicode support.

Some thoughts about font stacks in my blog
Avatar
18.11.2010 16:11
just looked into code and seems it's pure css and js for it, here is it will work nicely

segue ui will be used first, if not found then tahoma, if not found then sans, if not found then sans-serif

font-size: inherit !important;
font-family: 'segoe ui', tahoma, sans, sans-serif !important;
Avatar
10.11.2010 13:11
Firefox remember specifically per input id
for example when input has address id it will be easier in future to select from entered addresses before. if you entering name, then selecting names entered before. search then you will get only things entered in search.



can font be determined per operating system. anyway all modern winodows 6.0+ have segoe ui as deafult font. tahoma can be found in all windows versions since 5.0 (windows 2000). but the only is currently using is really too big and too ugly and draws without ansialiasing.
Avatar
07.11.2010 09:11
Thanks!:up:
Avatar
06.11.2010 21:11
It already exists as an extension :)

https://addons.labs.opera.com/addons/extensions/details/buscomplete/1.1/?display=en
Avatar
06.11.2010 20:11

Originally posted by kyotocafe:

wow! this is very nice, it should be published on extendopera, very nice job!


Yes! It would be nice to see it as an extension (OPS also) :)
Converting UserJS to Opera Extensions
Avatar
06.11.2010 15:11
is it remember history for specifically per input id like firefox?

would be nice to see system font in popup list
Avatar
06.11.2010 15:11

Originally posted by myregs:

is it remember history for specifically per input id like firefox?


nope, should it? what is the advantage?

Originally posted by myregs:

would be nice to see system font in popup list


There might be some problems with different fonts, so I choose font which all OS supports
Avatar
05.10.2010 17:10
there are still some serious bugs that must be fixed)
Avatar
05.10.2010 14:10
wow! this is very nice, it should be published on extendopera, very nice job!
Avatar
24.09.2010 22:09
I'm currently working on extending another userjs, but I will focus then on this one and perhaps I will also create some special version with same list for all domains :)
Avatar
24.09.2010 21:09
Thx nice script, but i am too want storage for all domain, please.
Avatar
19.09.2010 23:09

Originally posted by BS-Harou:

yes, it's possible, but it would create a huge list of items. I would suggest you to use [ALT+P](Preferences)>Forms where you can set quite a lots of things you may often use.


Additionally, you can use notes to supplement with things you use less often, but often enough that you don't want to type them all the time (plus you can make folders and such). Press the down key in a textfield to use that method.

Or, of course, the right mouse click combined with insert note and insert personal.
Avatar
15.09.2010 19:09
It possible to use a localStorage not for domain, but for all domain? In other script you used a User JS Storage Quota - maybe this is it? (I don't know what is it ;) )
Avatar
15.09.2010 19:09

Originally posted by adas:

It possible to use a localStorage not for domain, but for all domain? In other script you used a User JS Storage Quota - maybe this is it? (I don't know what is it ;) )



yes, it's possible, but it would create a huge list of items. I would suggest you to use [ALT+P](Preferences)>Forms where you can set quite a lots of things you may often use.
Avatar
21.08.2010 12:08
There are still some bugs I want to fix before :whistle:
Avatar
21.08.2010 11:08
People have been bugging me for this ever since I wrote Textarea Backup Localstorage, but I personally have no use for it.

You should add it to http://extendopera.org :)
Avatar
20.08.2010 16:08
Wow! Really great. Exactly what have been missing in Opera for ages.
Avatar
20.08.2010 00:08
thanks.
Avatar
19.08.2010 17:08
Thanks.
Avatar
19.08.2010 14:08

Originally posted by BS-Harou:

You can delete items with SHIFT+CLICK
You have to use CTRL+ARROW LEFT/RGITH instead of up/down - it's not possible to use arrow up and down in input field



Maybe only a button, such as "x" can be added at the right corner of the line for word. Maybe usefull for visual,becouse everyone couldn't know the shortcuts :)
Avatar
19.08.2010 14:08

Originally posted by ZAHEK:

Maybe only a button, such as "x" can be added at the right corner of the line for word. Maybe usefull for visual,becouse everyone couldn't know the shortcuts



Well, if you want more of this you can use OpS, that is exactly the different. I want o do it as much simple as I can =)

BTW I just find a way how to (perhaps) use arrows up and down!!!! I was looking for this for ages.
Avatar
19.08.2010 14:08
:)
No certainly necessary and this is so usefull..mine is only advise :)
Avatar
19.08.2010 14:08

Originally posted by ZAHEK:

No certainly necessary and this is so usefull..mine is only advise


sorry, I won't add any delete buttons - that is my final decision)

I added new version with arrow up/down support
Avatar
19.08.2010 14:08
new version again - this time it fixes the bug that when you shiftclicked on item for delete, whole list disappeared
Avatar
19.08.2010 13:08
First of all thanks :)
Do you think to add some features to it, such as arow, "del" button, etc.. or this is first and final vers..? :)
Avatar
19.08.2010 13:08

Originally posted by ZAHEK:

Do you think to add some features to it, such as arow, "del" button, etc.. or this is first and final vers..? :)



You can delete items with SHIFT+CLICK
You have to use CTRL+ARROW LEFT/RGITH instead of up/down - it's not possible to use arrow up and down in input field :/
Avatar
19.08.2010 12:08
What is next version? Truckcompletor
Avatar
19.08.2010 12:08
I actually use name "Traincomplete" for alpha versions :whistle:

Hide extra comments