Suddenly, an extension was needed that would push the user from div to div. Began to google, came across an example:
index.js
var buttons = require('sdk/ui/button/action'); var tabs = require("sdk/tabs"); var button = buttons.ActionButton({ id: "mozilla-link", label: "Visit Mozilla", icon: { "16": "./icon-16.png", "32": "./icon-32.png", "64": "./icon-64.png" }, onClick: handleClick }); var data = require("sdk/self").data; function handleClick(state) { tabs.open("http://google.ru"); } package.json
{ "title": "Title", "name": "Name", "version": "0.0.1", "description": "Add-on", "main": "index.js", "author": "Author", "engines": { "firefox": ">=38.0a1" }, "license": "MIT", "keywords": [ "jetpack" ] } By clicking on the icon opens the site. I am trying to change it so that at the touch of a button there is at least an alert (1). But the error - alert is not defined Tried to connect jQuery, also did not work. How to do all this? Maybe I do not understand something? What is the principle of the extensions? I thought I would quickly write on javascript and ready. And then nothing works for me ..