Skip to content

July 3, 2013

3

Enable 1Password for Opera

by e1ven

I’m a big 1Password fan, and it’s one of the things which kept me from using Opera 12.15 and below.
The new Opera is based on Chromium however, so it’s sorta-kinda compatible with Chrome extensions 😉

1PassScreenshot

Note- I was able to install the extension using the instructions I’ve written up below.
I can’t guarantee it’ll work for you. It might very well corrupt your 1Password file, or do nasty things.
It will also be overwritten (and need to be run again) once Agilebits updates their Extension.
In Short – YMMV.

1Password extension for Opera 15

  1. First off, we’ll need to download the 1Password Chrome Plugin, from Agile Bit’s site
  2. Make sure you click the “Allow beta extensions” button.
    AllowBeta
    Then, click the download button next to “Google Chrome”.
  3. Opera will say *”Extension was disabled because it is from unknown source. Go to the Extension Manager to enable it.”*, click “OK”.
  4. ExtensionBlocked

  5. Go to Window, then select Extensions, to open the Extension Manager.
    ExtensionsMenu
  6. One there, the 1Password extension will be greyed out.
    Press Install.

    Screen Shot 2013 07 02 at 5 56 20 PM

  7. It will prompt you again in a little pop-up. Press install again.
    AllowInstall

    Make a note of the version- In the case of our screenshot, it’s such as 3.9.20.2
    Version
    If the plugin updates later, and this version has changed, you’ll need to re-run these steps.

  8. Close both the Opera Extensions window, and the Agilebits “Extension Setup” Tab.
    Go to File, and choose “Close Tab” for both tabs.
    CloseThis2
    If you do not do this step, when Opera re-opens it will re-open the Agilebits Extension installer , and re-install the default version of the extension.

    This would undo the changes we make below, so make sure you close this 😉
  9. Quit Opera. Make sure you go to the Opera menu, and choose Quit, even if no webpages are showing.

    Quit

  10. Open the Terminal (It’s in Applications, Utilities)
    This will allow us to perform the additional steps necessary to load the extension.
    You can also open the terminal through Spotlight if that’s easier 😉
  11. Move to the directory where your Opera Extensions are installed.
    Enter the following command into the Terminal, and press enter.

    cd "/Users/`whoami`/Library/Application Support/com.operasoftware.Opera/Extensions"
    
  12. Next we need to locate the 1Password extension we just installed.
    The exact name changes, so we want to look for it in the “Info.plist” file that is distributed with the Extension.
    The following “Find” command will search for it, then move to it’s directory.

    cd $(dirname $(ls -th `grep -r "AgileBits" --include "Info.plist" * -l` | head -n 1))
    
  13. Chrome has an “Omnibox” which combines the URL bar with Search.
    Opera has something similar, but doesn’t let extensions talk to it yet – So we need to remove this code from the Extension, so it can load in Opera.
    Run the two commands below in the Terminal.

    cat code/global.min.js | python -c "import sys,re;a = re.sub(r'chrome\.omnibox(.*?)a.message\)}','',sys.stdin.read(),flags=re.MULTILINE|re.DOTALL); print(a)" > tmp
    cp tmp code/global.min.js
    
  14. Re-open Opera.
    You should be all set at this point – The extension will need to sync, which might take a minute or two after clicking on the icon.
    You might also find you have luck opening or closing the window which loads the extension.

    Notes-

    I had initially thought that it would be a lot more complicated to port the extension, but Opera does not seem to have changed the internals as much as I thought.
    For instance, 1Password uses tests such as

    if("object"==typeof chrome) { alert("foo")}
    

    These work with “chrome”, not “opera”.
    The most complicated part is that Chrome 15 does not have the Omnibar property.

    I’m not an expert, but there appears to be a few other cases where the extension could be updated to use more recent methods, such as moving sendRequest -> sendMessage, or chrome.tabs.getSelected -> chrome.tabs.query.
    In all, it appears to work, however.

    Advertisements
Read more from Uncategorized
3 Comments Post a comment
  1. Jul 3 2013

    Just brilliant…

    Thanks, moving away from Chrome now !

    Reply
  2. windowsUser
    Jul 4 2013

    Please do this for the windows version.

    Reply
  3. danke
    Jul 19 2013

    very good work. it works perfect. only the shortcut is missing.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

%d bloggers like this: