- 1 Настройка прокси
- 2 Upgrade Insecure Requests
- 3 The CRX Format
- 4 DevTools UI elements: panels and sidebar panes
- 5 What’s in an Opera extension?
- 6 Resource identifiers
- 7 Permissions and privileges
- 8 Suggestions in the address bar
- 9 Different parts of an extension
- 10 Ответы на вопросы об учетных записях Opera
- 11 Mozilla Firefox 17.0 Final TwinTurbo Full & Lite + Portable [2012, Браузер]
- 12 Using the chrome.omnibox API
- 13 Web Audio API updates
- 14 Prepare your details before submission
- 15 Communicating between extension components
- 16 Entries with “mobile” tag
- 17 Creating a DevTools extension
Прокси-сервер – это компьютер, который может, например: сохранять локальные копии страниц для ускорения доступа к ним; выступать в качестве «переводчика» между браузером и каким-либо специальным сервисом; настраивать и контролировать обмен информацией; увеличивать скорость интернет-соединения. Чтобы настроить прокси-сервер, выполните следующие действия.
- Перейдите в Settings (Настройки) (Preferences (Настройки) на Mac).
- Нажмите Browser (Браузер) на боковой панели.
- В разделе Network (Сеть) нажмите кнопку Change proxy settings (Изменить настройки прокси).
Теперь весь трафик соответствующего протокола будет проходить через указанный вами прокси-сервер. Чтобы использовать прокси-сервер, необходимо указать следующие данные.
- Протокол, например,
- Адрес в Интернете, например, или
- Номер порта, например,
Эту информацию можно получить у вашего интернет-провайдера, на хосте прокси-сервера или в документации к программному обеспечению прокси-сервера.
Если вы хотите использовать прокси для соединения даже с локальными серверами, установите флажок Use proxy for local servers (Использовать прокси для локальных серверов).
Если ваш интернет-провайдер требует автоматического определения прокси-сервера, введите веб-адрес, указанный провайдером.
Upgrade Insecure Requests
Suppose you host a number of pages over HTTP that all have various images, stylesheets, scripts, etc., and you want to make these pages available over HTTPS. You now have to modify all documents to make sure they don’t attempt to load any resources over HTTP, which would trigger mixed content warnings and prevent those assets from loading. For sites with a lot of those documents, this quickly becomes a big hassle.
The new Content Security Policy directive can now be used to transparently upgrade insecure resource requests to secure variants. This avoids the mixed content warnings without having to modify the HTML documents at all. For example, the following HTML would normally trigger mixed content warnings:
When served with a CSP HTTP header that enables the directive, the document would be interpreted as follows:
The CRX Format
Opera supports the CRX (short for ChRomium eXtension) file format for extensions. All the files and folders for an extension are packaged into a zip file and renamed as .crx. The CRX format supports a major portion of Chromium extensions, as well as APIs specific to Opera. The APIs from the Chromium project (like tabs) can be called using , whereas the ones specific to Opera (like Sidebar Action) will reside under the object.
It is important to note that Opera will run any extensions in Chromium’s CRX format, as long as the extension uses the APIs that Opera supports. The API docs section in the left sidebar gives you a good idea of the APIs Opera currently supports.
If you would like to see the code of an extension, you can rename the file extension to a .zip format, and then use a file unarchiver program (for example 7zip) to unzip the contents. On Mac, we recommend using the command in Terminal, as Archive Utility produces suboptimal results when dealing with signed files.
In addition to the usual extension UI elements, such as browser actions, context menus and popups, a DevTools extension can add UI elements to the DevTools window:
- A panel is a top-level tab, like the Elements, Sources, and Network panels.
- A sidebar pane presents supplementary UI related to a panel. The Styles, Computed Styles, and Event Listeners panes on the Elements panel are examples of sidebar panes. Currently your extension can only add sidebar panes to the Elements panel. (Note that the appearance of sidebar panes may not match the image, depending on the version of Opera you’re using, and where the DevTools window is docked.)
Creating a basic sidebar pane for the Elements panel looks like this:
There are several ways to display content in a sidebar pane:
- HTML content. Call to specify an HTML page to display in the pane.
- JSON data. Pass a JSON object to .
What’s in an Opera extension?
Apart from all the JS and HTML files, you’ll also need to put in some images for the extension icons.
All of this is wrapped in a ZIP file format with the .crx file extension. To know more about the architecture of extensions in Opera, please read the associated article, which describes it in detail.
Resource identifiers allow you to specify content settings for specific subtypes of a content type. Currently, the only content type that supports resource identifiers is plugins, where a resource identifier identifies a specific plug-in. When applying content settings, first the settings for the specific plug-in are checked. If there are no settings found for the specific plug-in, the general content settings for plug-ins are checked.
For example, if a content setting rule has the resource identifier adobe-flash-player and the pattern , it takes precedence over a rule without a resource identifier and the pattern , even if that pattern is more specific.
You can get a list of resource identifiers for a content type by calling the method. The returned list can change with the set of installed plug-ins on the user’s machine, but Chrome tries to keep the identifiers stable across plug-in updates.
Permissions and privileges
Permissions are necessary
Each extension comes with a manifest file which administers access over which browser APIs are allowed to be used, and in which set of domains the extension can run.
Seperation of privileges
The content script and the rest of the extension have separate roles and sets of privileges. Only the content script is able to modify the web page, but does not have the privilege to modify the UI layer. The rest of the extension components (background pages, popups etc) can do things on the UI layer, but do not have the privilege to modify the web page.
Content scripts works in isolated worlds
Content scripts can modify the web page since it has access to the DOM of the page, but it does not have access to the variables and functions that the web page has. A content script cannot access variables and functions defined by the background processes and vice versa (though they can communicate through message passing). This also means content scripts cannot access the extension APIs — they can only be accessed by background or event pages. Each content script lives in an isolated world — it cannot even access variables or functions defined in other content scripts present in the extension.
Content security policy
The content security policy is defined in an extension in the manifest, like so:
To know more about the syntax and possible values for writing your content security policy, take a look at the specification. By default, the policy string for extensions is supposed to be .
So if you do not define a policy exclusively in an extension manifest, then this policy is assumed. Under this policy, the following things are important to note:
and associated functions are not allowed
Things like and others (mentioned below) are disabled as they could be used in cross-site scripting attacks. In other worlds, do not use:
You could add the string to your policy string to make the extension use and related functions, but we would very strongly advise you against doing so.
Only locally loaded scripts and resources will load
Only scripts and objects loaded from the extension package will be allowed to load, so if you have something like:
This will not load as it’s an externally hosted script. To load the library in the extension, you will need to have it included as part of the package, and reference it like so:
No external scripts or resources loaded over HTTP are allowed — except in the case of your local server, in which case you could add either or to your whitelist. You could also add the following schemes to the whitelist: and .
Please note that this does not have any effect on the way you do AJAX. You are free to make a call through to any origin.
Suggestions in the address bar
The API also enables developers to provide suggestions to the user in the address bar as they type via the event handler. This event throws back the text which has been typed until now, as well as a function in which we can put our search suggestion as part of an array of objects. Let’s see how it’s done.
One thing to keep in mind is that when the user selects the default suggestion, it will by default not have a URL attached to it. So we will process the entered text at the point when the user has finally hit enter in the address bar, and see if it’s a proper URL or not. If not, we will convert it to a proper URL, and point the user to the appropriate page, like so:
You can download the extension — the keyword for this extension is extdocs, so type that followed by your search query — and see that the default suggestion is to search on the Opera Extensions documentation site. The next option is a search on StackOverflow with the tag , followed by a Google search. Keep in mind that all other options apart from the default one are listed in alphabetical order of their descriptions.
You can go further and have suggestions in the address bar by doing an AJAX request to your web service, with the suggestions executed in a similar manner as the one shown above. Making an address bar extension is pretty easy, so check out the API and get cracking!
Different parts of an extension
The Extension manifest
Every extension must contain a manifest file. The manifest file provides basic information like the name of the extension and the author, as well as some important information like the APIs the extensions wants to access, which is listed in the field. If the extension manifest is not correctly defined, the extension will not run at all. Another important thing to note is the field, where you can include the extension author’s name.
To know more about the extension manifest, read the API doc on it.
The Background Process
You need a process to run in the background to coordinate some tasks or to maintain a certain state. You have two variants of it — The Background Page or Event Page.
To specify an event page in the manifest file, you need to define the field as like so:
The background page (or the background script) is essential for the user interface. Any piece of code which requires adding a UI item to the browser needs to be defined here. It is also the one responsible for noticing a change in state and updating or otherwise modifying the UI accordingly.
Event pages are exactly like background pages, except that they only loaded when required. This means when the event page isn’t loaded, system memory and resources are not being used, thus giving better performance. Extensions authors are recommended to use event pages wherever they can.
Event pages are loaded when:
- The extension is installed, restarted, started or updated to a new version.
- An event is dispatched which the event page was listening for.
- When another part of the extension (like a popup) calls it (for example, using ).
- When another part of the extension sends a message (using or using long-lived connections. You can read more on message passing in our article).
The primary difference between background pages and event pages is that event pages are intended to handle events only. So you’d register event listeners in the eventpage.js and the browser will optimize the way it stores and runs these events at runtime. Anything not wrapped in event listeners will be handled on load and then only kept around by the engine if the variables and functions are referenced in any way inside any event listeners.
In other words, try to use an event page whenever feasible, as it will lead to better performance and lesser resource consumption by the browser.
The Content Script
If you want to make any change to the web page itself, then you need to use a content script. The content script has access to the DOM of the web page, but access to variables and functions is confined to only itself. For example, content scripts cannot access variables defined in the web page, or even in other content scripts.
The content script does not have direct access to the variables and functions in the background scripts too. The same applies for access to API functions. However, you can use message passing to communicate between various parts of the extensions, be it background scripts or popups. So, you could call your functions in the background script and then communicate to the content script to do a certain task involving the host page’s DOM.
More details on it can be found in our article on content scripts.
The Popup Page
Sometimes extensions will have a popup which, well, pops up when you click an extension button. This is defined by an HTML page, and needs to be specified in the manifest. Read the buttons, badges and popups article to learn more.
The Options Page
If your extension needs a place to store user preferences then you should create an options page. If you define an options page then a link will be provided at the extensions management page from where the user can access the page. You need to declare it in the manifest like so:
You can use as defined in the Web Storage API to store user preferences for the extension.
Icons and other files
Your extensions need icons (A 128×128 icon used for the addons page and during installation, a 48×48 one for the extensions management page, a 16×16 one for the favicon for the extension’s pages, and a 19×19 one in case you need to put an icon as a browser or page action). Apart from icons, you might also need other files like images, fonts etc. as well as CSS and JS files for pages like the popup or options pages. All of these can be placed anywhere inside of the extension package.
Ответы на вопросы об учетных записях Opera
Я забыл свой пароль. Как его восстановить?
Если вы когда-либо входили в учетную запись Opera со своего компьютера, вы можете посмотреть пароль учетной записи в менеджере паролей Opera. Для этого в браузере Opera на компьютере:
- Откройте настройки.
- Нажмите на раздел Дополнительно на боковой панели и выберите Безопасность.
- В разделе Пароли и формы нажмите кнопку Управление паролями.
- Введите «auth.opera.com» в строке поиска менеджера паролей, чтобы найти данные своей учетной записи Opera.
Также пароль можно сбросить. Перейдите на домашнюю страницу учетных записей Opera и нажмите ссылку Забыли пароль?. Рекомендуем после регистрации учетной записи подтверждать свой адрес электронной почты, чтобы у нас был ваш правильный адрес.
Если вы забыли главную парольную фразу синхронизации, вам понадобится сбросить данные синхронизации.
Какими услугами я могу пользоваться, имея учетную запись Opera?
Имея учетную запись Opera, вы сможете:
- синхронизировать данные браузера между компьютерами, телефонами и планшетами;
- обращаться за помощью и обсуждать продукты Opera с другими пользователями (а иногда и инженерами Opera) на форумах Opera;
- делать свой браузер Opera функциональнее, безопаснее или необычнее, а также менять его внешний вид с помощью расширений и тем из каталога дополнений Opera.
Как войти в учетную запись Opera в браузере?
Вы можете войти в учетную запись Opera на компьютере, на телефоне или на планшете. На каждом устройстве способ входа свой.
На компьютере (с Opera 28 и выше):
- Откройте Opera.
- Откройте настройки.
- В разделе Синхронизация нажмите кнопку Войти.
На устройстве с Android (Opera 28 и выше или Opera Mini 8 и выше):
- Откройте приложение Opera для Android.
- Нажмите меню «O» и выберите Настройки.
- Выберите пункт меню Войти (в Opera).
На устройстве с iOS (Opera Mini 10 или выше):
- Откройте приложение Opera Mini.
- Нажмите меню «O» и выберите Настройки.
- В разделе Синхронизация выберите пункт меню Войти.
Безопасно ли пользоваться учетной записью? Как хранятся мои данные?
Не беспокойтесь, мы не следим за тем, что вы делаете в своей учетной записи Opera. На серверах Opera хранится только анонимный токен для вашей идентификации и синхронизации ваших данных. На серверах сохраняется определенная информация, такая как URL-адреса ваших закладок, местоположение изображений, назначенных закладкам, а также некоторые метаданные страниц, соответствующих закладкам. Мы очень серьезно относимся к вашей безопасности и приватности. Дополнительную информацию можно найти в нашем Заявлении о конфиденциальности.
Mozilla Firefox 17.0 Final TwinTurbo Full & Lite + Portable [2012, Браузер]
Год выпуска: 2012Жанр: БраузерРазработчик: Mozilla FoundationСайт разработчика: http://www.mozilla.org/Язык интерфейса: РусскийТип сборки: RePackРазрядность: 32-bitОперационная система: Windows XP, 2003, Vista, 7, 8Системные требования: Процессор Pentium 4 или выше, поддерживающий SSE2Память: 512 МБ Свободное место наЖД: 200 МБ Описание: Mozilla Firefox — без сомнений лучший веб-навигатор всех времен и народов. Это быстрый и надежный, легкий в работе и хорошо защищенный бесплатный браузер. Одно из основных достоинств браузера Mozilla Firefox — гибкость и расширяемость. Простой и лак …
Using the chrome.omnibox API
We have used the manifest to define the keyword we’ll use. Great! Now let’s go on and actually process the text to do something useful. One of the most common use cases for the API would be to take the text and search a certain website with it.
So let’s make an extension which takes the text and searches this site for content. In the API, we have access to event handlers dealing with various stages of the user entering content (for example, when the user has started entering text, when the user has finished typing, when the text has changed, when the text entered is accepted, etc.)
For our example, we will use the event handler to take the user’s input and take the user to the search page. The background page for our extensions would like so:
The above code will listen to the user’s input and when he hits enter, then it will take the input and redirect to the Opera extensions documentation page with what the user entered as the search query.
Feel free to download this extension and try it out yourself.
Web Audio API updates
Matching a change in the Web Audio API specification, the property of an should no longer be set more than once. This protects developers from the lack of control over when the new source starts. From now on, if the property is assigned to more than once, a deprecation message is logged to the DevTools console.
now returns a promise that s with the rendered audio when rendering has finished. A demo is available.
Note: The Web Audio API implementation in Opera doesn’t yet support proprietary codecs such as MP3. (This is in contrast to and , which already hook into the codecs made available by the operating system.) We’re working to fix this as soon as possible.
Prepare your details before submission
Before you submit your extension, you should do the following to prepare, and get all the details you need together. The following sections contain many hints and tips for creating effective descriptions, screenshots, etc. If you have been through all these before and just need a checklist to check your details against, go straight to the section.
Pick a good name
Think carefully about the name of your extension. It needs to be memorable, short and appropriate, so it is easy for users to find and remember.
Choose a version number
The version number can consist of one to four dot-separated integers. Examples are , , , and . Note that non-zero integers cannot start with 0 — in other words, is not allowed. For more details, see the .
Create an extension support page (optional)
You should seriously consider creating a support page for your extension. We’d recommend you include news of new releases and updates, detailed usage instructions, a portfolio of your other work, and contact details in case anyone needs to contact you with queries.
The support webpage should be relevant to your extension. If it is not, your extension may be rejected.
Choose a category
Choose one of the following categories for your extension:
- News & Blogging
- Web Development
Choose a license
Choose the distribution license for your extension — the Opera Extensions site allows you to choose between two when uploading.
With the Opera hosting license you keep all content rights, but allow Opera to make the extension available free of charge to users worldwide. Opera can make changes to the extension, if required to make it work properly.
Alternatively, if you prefer an Open Source license that allows anyone to build on your work, you can choose the Apache 2.0 license.
Write a good summary
The summary should briefly explain what your extension does. This will be shown on the front page of the catalogue and in the extensions manager in the browser. Keep it short and sweet — try summarizing its purpose and functionality in one sentence.
Write a good description
The description provides more detail about your extension to supplement the summary. It shouldn’t just be a copy of the summary: it should aim to describe what your extension looks like, what its purpose is, and how you use it. You could also choose to write about the main features, the target audience, and what is coming in future versions.
Test your extension
You should test your extension on Mac as well as Windows, and try it out in low and high bandwidth scenarios. Also make sure it doesn’t unnecessarily slow down the browser, or otherwise impacts the user experience in a negative way.
Create a good icon
You also need to have a good icon prepared for your extension. For more information on creating a good icon, along with icon templates, read Creating effective Opera Extension icons.
Take good screenshots
You need to provide screenshots of your extension. We recommend one screenshot to show how the extension works and one to show how it looks in the browser. Your screenshots should be tidy and clearly illustrate the main features of your extension. They should appeal to your potential users.
- Have a screenshot size of 612×408 pixels. This is the preferable screenshot size. The maximum you go can go with it is 800×600 pixels (though we would recommend you stick with 612×408 pixels if possible).
- Take your screenshots with a white background.
- Disable other extensions you have installed, so that yours can take center stage.
- Make sure to include the relevant part of your functionality.
- Show the location of the extension in the browser UI. For example, if your extension has a button on the toolbar, focus the screenshot on this location. Make a screenshot of the extension in action. In an image editor, center the image and crop the screenshot, leaving some whitespace if necessary.
- Show how the extension interacts with a webpage, if this is the case. Make sure the screenshot highlights the functionality of your extension and not merely the webpage.
- Use the default UI of the browser (consider using a clean install.)
You should not:
- Make the screenshots larger than 800×600 pixels.
- Show any page or background tab that is not relevant to the extension.
- Include superfluous content.
- Show other extensions or other customizations.
Communicating between extension components
The following sections describe some typical scenarios for communicating between the different components of a DevTools extension.
Injecting a Content Script
The DevTools page can’t call directly. To inject a content script from the DevTools page, you must retrieve the ID of the inspected window’s tab using the property and send a message to the background page. From the background page, call to inject the script.
If a content script has already been injected, you can add additional context scripts using the method. See Passing the Selected Element to a Content Script for more information.
The following code snippets show how to inject a content script using .
Code for the background page:
By default, the expression is evaluated in the context of the main frame of the page. Use the option to evaluate the expression in the same context as the content scripts.
Calling with does not create a content script context, so you must load a context script before calling , either by calling or by specifying a content script in the file.
Once the context script context exists, you can use this option to inject additional content scripts.
Passing the Selected Element to a Content Script
The content script doesn’t have direct access to the current selected element. However, any code you execute using has access to the DevTools console and command-line APIs. For example, in evaluated code you can use to access the selected element.
To pass the selected element to a content script:
- Create a method in the content script that takes the selected element as an argument.
- Call the method from the DevTools page using with the option.
The code in your content script might look something like this:
Invoke the method from the DevTools page like this:
The option specifies that the expression must be evaluated in the same context as the content scripts, so it can access the method.
Messaging from Content Scripts to the DevTools Page
Messaging between the DevTools page and content scripts is indirect, by way of the background page.
When sending a message to a content script, the background page can use the method, which directs a message to the content scripts in a specific tab, as shown in Injecting a Content Script.
When sending a message from a content script, there is no ready-made method to deliver a message to the correct DevTools page instance associated with the current tab. As a workaround, you can have the DevTools page establish a long-lived connection with the background page, and have the background page keep a map of tab IDs to connections, so it can route each message to the correct connection.
The DevTools page (or panel or sidebar pane) establishes the connection like this:
Detecting When DevTools Opens and Closes
If your extension needs to track whether the DevTools window is open, you can add an listener to the background page, and call from the DevTools page. Since each tab can have its own DevTools window open, you may receive multiple connect events. To track whether any DevTools window is open, you need to count the connect and disconnect events as shown below:
The DevTools page creates a connection like this:
Entries with “mobile” tag
Progressive Web Apps: The definitive collection of resources
11 November 2016 by Bruce Lawson, Shwetank Dixit in Articles
Want to get started with progressive web apps, but not sure where to start? This page will list the best resources we know of to help you understand Progressive Web Apps (PWAs), get started and learn things in depth.
Progressive Web Apps presentations at Web Rebels and the PWA Dev Summit
29 June 2016 by Andreas Bovens in Blog
In the last couple of weeks, I’ve spoken about Opera’s involvement with progressive web apps at Web Rebels in Oslo and at the PWA Dev Summit in Amsterdam. Here are videos of these talks.
Making progressive web apps even better: ambient badging and “pop into browser”
21 June 2016 by Andreas Bovens in Blog
We’re excited to release a Labs build of Opera for Android with support for two experimental features that enhance the discoverability and use of progressive web apps.
Progressive Web App install banners come to Opera for Android
31 March 2016 by Andreas Bovens in Blog
In Opera 36, we’ve started showing a “web app install banner” for sites that meet a set of criteria, qualifying them as a progressive web app.
Progressive Web Apps Are the Future
19 November 2015 by Andreas Bovens, Vadim Makeev in Blog
The two-day Chrome Dev Summit at Google’s headquarters in Mountain View is a wrap! Vadim and I had a great time attending the summit, and this year, I even had the pleasure to speak about Progressive Web Apps
1 July 2015 by Andreas Bovens, Bruce Lawson in Blog
Last week, Bruce and I were in London for two high-profile web standards events, where we spoke about installable web apps and the exciting possibilities it brings.
Spreading knowledge in the developing world for free: An interview with the Worldreader team
18 May 2015 by Shwetank Dixit in Articles
Worldreader is a non-profit organization providing free digital book people in developing countries. I got to ask their team a few questions regarding their fascinating work in developing countries
Browser update news
24 April 2014 by Bruce Lawson in Blog
What better way to celebrate the new redesigned Dev.Opera than with a round-up of new Opera browser releases?
Practical Application and Usage of the W3C Device Orientation API
26 March 2014 by Rich Tibbett in Articles
The W3C device orientation API allows us to determine the orientation of a device in physical space. In this advanced tutorial we cover some of the pitfalls and propose some new ways of working with this data for developing practical device-orientation-aware web applications on mobile devices.
Media Capture in Mobile Browsers
26 September 2013 by Francesco Iovine in Articles
Media Capture is one of the most interesting features in web applications, especially for mobile devices. Surprisingly capturing media on the spot is quite a new thing for browsers in general, until recently always being delegated to browser plugins such as Flash or Silverlight. In this article we will explore how to use the Media Capture APIs, their compatibility across mobile browsers and the current state of the W3C specifications that define them.
Opera 14 for Android Is Out!
21 May 2013 by Andreas Bovens in Blog
Opera 14 for Android is built on top of Chromium 26, with a total overhaul of the UI in native code, making it fit well with the latest Android design guidelines. Go get the build from Google Play or point your browser to m.opera.com, and give it a spin!
Opera 14 Beta for Android Is Out
5 March 2013 by Andreas Bovens in Blog
Yes, that’s right: 14. We think that the engine switch from Presto to WebKit that we announced a few weeks ago is such a big step that we decided to skip the 13 number altogether, and go straight to 14! But there’s more than just the engine to talk about: you’ll also notice a total overhaul of the UI in native code, making it fit well with the latest Android design guidelines. Go get the beta from Google Play or point your browser to m.opera.com, and give it a spin!
An Introduction to Meta Viewport and
22 March 2011 by Andreas Bovens in Articles
Support for the viewport tag in Opera’s mobile products has been around for quite some time — in Opera Mobile 11, we have made our viewport implementation more robust, added support for new mechanisms to deal with different screen densities, and included an implementation of our own rule proposal. So, what better time than now to give you an introduction to the various viewport related mechanisms you can use to optimize your site for mobile.
Web, Meet the Element (And Orientation Events)
Making Your Site Mobile-Friendly — RIT++ 2010, Moscow
Creating a DevTools extension
To create a DevTools page for your extension, add the field in the extension manifest:
An instance of the specified in your extension’s manifest is created for every DevTools window opened. The page may add other extension pages as panels and sidebars to the DevTools window using the API.
The API modules are available only to the pages loaded within the DevTools window. Content scripts and other extension pages do not have these APIs. Thus, the APIs are available only through the lifetime of the DevTools window.