Copy over devhub docs from remora (Bug 654759)

This commit is contained in:
Gregory Koberger 2011-05-16 16:00:48 -07:00
Родитель 399616dc59
Коммит 367f6d408d
22 изменённых файлов: 1898 добавлений и 30 удалений

Просмотреть файл

@ -35,6 +35,15 @@ def dev_page_title(context, title=None, addon=None):
return page_title(context, title) return page_title(context, title)
@register.function
@jinja2.contextfunction
def docs_page_title(context, title=None):
"""Wrapper for docs page titles."""
devhub = _('Add-on Documentation :: Developer Hub')
title = '%s :: %s' % (title, devhub) if title else devhub
return page_title(context, title)
@register.function @register.function
@jinja2.contextfunction @jinja2.contextfunction
def dev_breadcrumbs(context, addon=None, items=None, add_default=False): def dev_breadcrumbs(context, addon=None, items=None, add_default=False):
@ -68,6 +77,21 @@ def dev_breadcrumbs(context, addon=None, items=None, add_default=False):
return breadcrumbs(context, crumbs, add_default) return breadcrumbs(context, crumbs, add_default)
@register.function
@jinja2.contextfunction
def docs_breadcrumbs(context, items=None):
"""
Wrapper function for `breadcrumbs` for devhub docs.
"""
crumbs = [(reverse('devhub.index'), _('Developer Hub')),
(reverse('devhub.index'), _('Developer Docs'))]
if items:
crumbs.extend(items)
return breadcrumbs(context, crumbs, True)
@register.inclusion_tag('devhub/versions/add_file_modal.html') @register.inclusion_tag('devhub/versions/add_file_modal.html')
@jinja2.contextfunction @jinja2.contextfunction
def add_file_modal(context, title, action, upload_url, action_label): def add_file_modal(context, title, action, upload_url, action_label):

Просмотреть файл

@ -0,0 +1,83 @@
{% extends "devhub/base.html" %}
{% block title %}{{ docs_page_title("Getting Started") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(None, _("Getting Started"))]) }}
{% trans base_docs=url('devhub.docs') %}
<h2>Getting Started</h2>
<div id="getting-started" role="main">
<!-- Localization note: this page is intended to be fun and jokes around to make add-on development sound easy for those getting started. Please feel free to translate humorous parts/metaphors into something that works in your locale, or take them out if you want. Thanks! -->
<p>If you've used Firefox add-ons before, you know that they're capable of some pretty impressive features &mdash; from inspecting the underlying framework of a website to displaying a scrolling 3-D wall of pictures and video. But some of the most popular add-ons just make minor changes to Firefox through easily learned languages like JavaScript, XUL, and CSS. If you have an idea for your first add-on, start out with something simple to learn the basics of how extensions are packaged and interact with Firefox.</p>
<ol class="numbered">
<li>
<h4 class="step">1</h4>
<h3>Learn the basics</h3>
<p>The easiest way to do that is to follow along with the <a href="https://developer.mozilla.org/En/Firefox_addons_developer_guide">Firefox Add-ons Developer Guide</a> as it explains in detail the technologies used in extensions and walks through the creation of several basic extensions.</p>
<p class="big-link"><a href="https://developer.mozilla.org/En/Firefox_addons_developer_guide">Visit the Firefox Add-ons Developer Guide</a></p>
<p>If you'd rather dive right in, there are several other tutorials in our <a href="{{ base_docs }}how-to/getting-started">Getting Started
section</a> of the <a href="{{ base_docs }}how-to">How-to Library</a> that jump straight into code. And if you have some time to spare, you may prefer a video walkthrough of extension basics: <a href="http://design-challenge.mozilla.com/resources/#extension_bootcamp">Extension Bootcamp: Zero to Hello World! in 45 Minutes</a>.</p>
</li>
<img src="/img/amo2009/developers/addon-builder.png" alt="" class="right-image" /> <!-- image -->
<li>
<h4 class="step">2</h4>
<h3>Build your add-on</h3>
<p>Once you're familiar with the extension development environment, it's time to start on your first add-on. Back in the day, this meant climbing up a hill in the snow to find a suitable template to copy for your add-on's install manifest. Fortunately, the Add-on Developer Hub (that's this!) introduces the snowmobile of extension packaging: the <a href="/en-US/developers/tools/builder">Add-on Builder</a>!</p>
<p>Just follow the steps to enter your add-on's name, version number, supported applications, and other details, and it will make your extension package for download. Not only does it generate your install manifest, but you can select common interface elements like toolbars, sidebars, and context menus to make a working extension skeleton. We're practically writing your extension for you!</p>
<p class="big-link"><a href="/en-US/developers/tools/builder">Take me to the Add-on Builder!</a></p>
</li>
<li>
<h4 class="step">3</h4>
<h3>Add some flair</h3>
<p>If your add-on needs more functionality than the empty sidebar the Builder made for you, there are several ways to find out how to add the functionality you want. One of the most common ways of learning how to do something in an extension is to look at what other extensions already do. Just remember that if the other extension's license doesn't allow you to copy its source, you can't.</p>
<p>We also have two areas here in the Hub that may help you out: the <a href="{{ base_docs }}reference">API &amp; Language References</a> page has
links to official documentation for extension languages and APIs like JavaScript, XUL, XPCOM, and FUEL. Secondly, the <a href="{{ base_docs }}how-to">How-to Library</a> is full of tutorials, walkthroughs, videos, and articles written by smart people on extension development and best practices.</p>
<p class="big-link"><a href="{{ base_docs }}reference">View the References</a><a href="{{ base_docs }}how-to">Enter the How-to Library</a></p>
<p>If you already know what you're looking for, just <a href="/en-US/developers/search">search for it!</a> Our search will scour the best add-on resources to find that missing interface or common problem you're having. If search isn't cutting it, feel free to <a href="https://forums.addons.mozilla.org">ask for help</a> in our forums.</p>
</li>
<li>
<h4 class="step">4</h4>
<h3>Test your add-on</h3>
<p>Even entymologists don't like bugs in their software, so it's important to test your add-on thoroughly before it's ready for general consumption. At minimum, you should make sure your add-on works on all the platforms and applications it claims to support.</p>
<p>To help detect common problems with packaging and security, you should run our <a href="/en-US/developers/addon/validate">Add-on Validator</a> tool on your file. It's like Spell Check for add-ons. Your add-on will automatically be validated upon submission, but you may want to test it out beforehand. Plus, passing makes you feel good.</p>
<p class="big-link"><a href="/en-US/developers/addon/validate">Validate my Add-on</a></p>
</li>
<li>
<h4 class="step">5</h4>
<h3>Share your add-on with the world</h4>
<p>Woah, you finished your add-on already? Just so you know, <a href="http://labs.mozilla.com/">Mozilla Labs</a> is hiring. Alright, if you've tested your add-on out and it's free of problems, it's time to submit your add-on to <a href="https://addons.mozilla.org">Mozilla Add-ons</a>. With over <em>1.5 billion</em> add-on downloads served, it's the best place to let your new creation live. Before you submit it, there are a few things to go over.</p>
<p>Mozilla cares a lot about user experience and security. That's why we have a team of volunteer Editors that review add-ons submitted to the site before they are allowed to roam free. We have a number of policies that we require add-on developers and their contributions to adhere to. Please review these policies before submitting your add-on to ensure your add-on is approved the first time.</p>
<p class="big-link"><a href="{{ base_docs }}policies">Review Add-on Policies</a></p>
<p>Everything in compliance? Great. There's only one thing left to do...</p>
<p class="big-link"><a href="/en-US/developers/addon/submit" class="positive">Submit my Add-on!</a></p>
<p>Congratulations!</p>
</li>
</ol>
<p>If you're feeling talkative, we'd love to <a href="https://forums.addons.mozilla.org">hear your feedback</a> on how your experience creating an add-on was. Hearing what new developers struggle with helps us make the experience better for future generations of add-on innovators. Whether you want to comment on the platform, the documentation, or the website, we'll listen. Better yet, since Mozilla is open, you might even be able to fix that bug or lack of documentation yourself! It's like the circle of life.</p>
</div>
{% endtrans %}
{% endblock %}

Просмотреть файл

@ -0,0 +1,173 @@
{% extends "devhub/docs/how-to.html" %}
{% block title %}{{ docs_page_title("Extension Development") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='how-to'), _("How-to Library")), (None, _("Extension Development"))]) }}
{% trans %}
<h2>Extension Development</h2>
<div class="primary" role="main">
<p class="hub-category-description">Once you know the basics, these guides will help you with intermediate to advanced extension development topics.</p>
<h3>Best Practices</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="http://blogger.ziesemer.com/2007/10/respecting-javascript-global-namespace.html" target="_blank">Respecting the JavaScript Global Namespace</a>
</h4>
<p>In this blog post, Mark Ziesemer explains how to prevevent global namespace pollution by wrapping your extension&#039;s variables.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<span class="label">Editor's Pick:</span> <a href="https://developer.mozilla.org/en/Security_best_practices_in_extensions" target="_blank">Security Best Practices in Extensions</a>
</h4>
<p>Every extension developer should know and follow the security best practices outlined in this document to keep users safe.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Localizing_an_extension" target="_blank">Localizing an Extension</a>
</h4>
<p>This article explains how to localize an extension, including XUL and JavaScript strings.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://blog.fligtar.com/2008/10/16/responsible-first-run-usage/" target="_blank">Responsible First-run Usage</a>
</h4>
<p>This blog post describes what a bad first-run experience means for users, and gives tips for improving that experience.</p>
</div>
</div>
</div>
<h3>Security</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Components.utils.evalInSandbox" target="_blank">Evaluating Code with Restricted Privileges</a>
</h4>
<p>This article describes the use of Components.utils.evalInSandbox, which is a way to evaluate code &#40;such as remote code&#41; without chrome privileges.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/En/Creating_Sandboxed_HTTP_Connections" target="_blank">Creating Sandboxed HTTP Connections</a>
</h4>
<p>This article explains how to created sandboxed HTTP connections which don&#039;t affect the user&#039;s cookies.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/En/Displaying_web_content_in_an_extension_without_security_issues" target="_blank">Displaying Web Content in an Extension</a>
</h4>
<p>Learn how to display web content in an extension without security issues.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://adblockplus.org/blog/five-wrong-reasons-to-use-eval-in-an-extension" target="_blank">Five Wrong Reasons to Use eval&#40;&#41; in an Extension</a>
</h4>
<p>In this blog post, Wladimir Palant gives five wrong ways to evaluate code in an extension.</p>
</div>
</div>
</div>
<h3>Localization</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Localizing_extension_descriptions" target="_blank">Localizing Extension Descriptions</a>
</h4>
<p>Learn how to localize the names and descriptions in extension install manifests.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Localization_and_Plurals" target="_blank">Localization and Plurals</a>
</h4>
<p>This article explains how to properly localize strings with plurals.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://www.babelzilla.org/index.php?option=com_content&amp;task=view&amp;id=1&amp;Itemid=1" target="_blank">BabelZilla overview</a>
</h4>
<p>Learn how the BabelZilla localization community works.</p>
</div>
</div>
</div>
<h3>Advanced Topics</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<span class="label">Video:</span> <a href="http://design-challenge.mozilla.com/resources/#extension_hacks" target="_blank">Stupid/Awesome Extension Development Hacks</a>
</h4>
<p>In this video, Jono Xia explains how to go further in extension development using XPCOM, overlays, XHRs, DOM manipulation, etc. in order to make Firefox do things you might have never thought possible.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/JavaScript_code_modules" target="_blank">JavaScript Code Modules</a>
</h4>
<p>JavaScript code modules let multiple privileged JavaScript scopes share code. For example, a module could be used by Firefox itself as well as by extensions, in order to avoid code duplication.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Creating_Custom_Firefox_Extensions_with_the_Mozilla_Build_System" target="_blank">Creating Custom Firefox Extensions with the Mozilla Build System</a>
</h4>
<p>This article describes how to set up the development environment for a large, complex Firefox extension with a need for high-performance, use of third-party libraries in C/C++, or interfaces not exposed via XPCOM.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Multiple_Item_Packaging" target="_blank">Multiple Item Packaging</a>
</h4>
<p>This article explains how to create an extension package with multiple items &#40;extensions&#41;.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Extensions" target="_blank">Extension Documentation Index</a>
</h4>
<p>If you can&#039;t find what you&#039;re looking for in the above articles, try the Mozilla Developer Center&#039;s Extensions landing page.</p>
</div>
</div>
</div>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,154 @@
{% extends "devhub/docs/how-to.html" %}
{% block title %}{{ docs_page_title("Getting Started") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='how-to'), _("How-to Library")), (None, _("Getting Started"))]) }}
{% trans %}
<h2>Getting Started</h2>
<div class="primary" role="main">
<p class="hub-category-description">Learn the basics of developing an extension on the Mozilla platform with this section full of beginner&#039;s guides.</p>
<h3>The Basics</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<span class="label">Editor's Pick:</span> <a href="https://developer.mozilla.org/en/XUL_School" target="_blank">XUL School Tutorial</a>
</h4>
<p>This tutorial will guide you through all the basics of add-on development, teaching you how to package them, create a suitable development environment, and program the most common features found in add-ons. It includes working code samples and the references and tools to explore all topics more in depth.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Setting_up_extension_development_environment" target="_blank">Setting Up an Extension Development Environment</a>
</h4>
<p>This article gives suggestions on how to set up your Mozilla application for extension development, including setting up a profile, changing preferences, and helpful development tools.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<span class="label">Video:</span> <a href="http://design-challenge.mozilla.com/resources/#extension_bootcamp" target="_blank">Extension Bootcamp: Zero to Hello World! in 45 Minutes</a>
</h4>
<p>In this video tutorial, Myk Melez explains how extensions integrate into Firefox, what they can do, and shows you how to set up an environment to ease their development. He&#039;ll then walk you through the making of a simple &quot;Hello World!&quot; extension. By the end of this session, you&#039;ll be an extension developer.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Building_an_Extension" target="_blank">Building an Extension</a>
</h4>
<p>This tutorial will take you through the steps required to build a very basic extension - one which adds a status bar panel to the Firefox browser containing the text &quot;Hello, World!&quot;</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Extension_Packaging" target="_blank">Extension Packaging</a>
</h4>
<p>Learn more details on how extensions are packaged and installed.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Install_Manifests" target="_blank">Install Manifests</a>
</h4>
<p>This document explains install manifests &#40;install.rdf&#41; and all of properties available for use in your add-on.</p>
</div>
</div>
</div>
<h3>Other Tutorials</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<span class="label">Editor's Pick:</span> <a href="https://developer.mozilla.org/En/Firefox_addons_developer_guide" target="_blank">Firefox Add-ons Developer Guide</a>
</h4>
<p>In this detailed guide to extension development, you&#039;ll learn the basics of packaging extensions, building an interface with XUL, implementing advanced processes with XPCOM, and how to put it all together.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://robertnyman.com/2009/01/24/how-to-develop-a-firefox-extension/" target="_blank">How to Develop a Firefox Extension</a>
</h4>
<p>In this walk-through, Robert Nyman explains how to develop a Firefox extension from scratch.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://lifehacker.com/264490/how-to-build-a-firefox-extension" target="_blank">How to Build a Firefox Extension</a>
</h4>
<p>Lifehacker gives tips and helpful hints on developing your first Firefox extension.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://www.rietta.com/firefox/Tutorial/overview.html" target="_blank">Firefox Extension Development Tutorial</a>
</h4>
<p>A multi-page tutorial covering a variety of extension development topics.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Creating_a_status_bar_extension" target="_blank">Creating a Status Bar Extension</a>
</h4>
<p>Learn how to create a simple status bar extension and add more advanced functionality in subsequent tutorials, linked below.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Creating_a_dynamic_status_bar_extension" target="_blank">Creating a Dynamic Status Bar Extension</a>
</h4>
<p>This article modifies the status bar extension created in the above tutorial by fetching content from a website at a regular interval.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Adding_preferences_to_an_extension" target="_blank">Adding Preferences to an Extension</a>
</h4>
<p>This article shows how to add preferences to the dynamic status bar created in the above tutorial.</p>
</div>
</div>
</div>
<h3>Books</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="http://www.sitepoint.com/books/byofirefoxpdf1/" target="_blank">Build Your Own Firefox Extension E-book</a>
</h4>
<p>With a little JavaScript know-how, author James Edwards will show you just how straightforward it is to build your own Firefox extensions.</p>
</div>
</div>
</div>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,75 @@
{% extends "devhub/docs/how-to.html" %}
{% block title %}{{ docs_page_title("Other Types of Add-ons") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='how-to'), _("How-to Library")), (None, _("Other Types of Add-ons"))]) }}
{% trans %}
<h2>Other Types of Add-ons</h2>
<div class="primary" role="main">
<p class="hub-category-description">Find information on Search Plug-ins, Jetpack, Personas, and other types of add-ons here.</p>
<h3>Jetpack</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://jetpack.mozillalabs.com/tutorial.html" target="_blank">Jetpack Tutorial</a>
</h4>
<p>Learn how easy it is to extend Firefox with Jetpack in this tutorial.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://jetpack.mozillalabs.com/sdk/latest/docs/" target="_blank">Jetpack API Documentation</a>
</h4>
<p>This Jetpack API documentation is a must-have for working on your Jetpack.</p>
</div>
</div>
</div>
<h3>Personas</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="http://getpersonas.com/demo_create" target="_blank">How to Create Personas</a>
</h4>
<p>Learn how to create your very own Persona with this official walk-through.</p>
</div>
</div>
</div>
<h3>Search Plug-ins</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Creating_OpenSearch_plugins_for_Firefox" target="_blank">Creating OpenSearch Plug-ins for Firefox</a>
</h4>
<p>This article explains the structure and requirements of search plug-ins in Firefox.</p>
</div>
</div>
</div>
<h3>Plug-ins</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Plugins" target="_blank">Plug-in Documentation Index</a>
</h4>
<p>Plug-ins to Mozilla-based applications are binary components that can display content that the application itself can&#039;t display natively. Explore the Mozilla Developer Center&#039;s plug-in documentation index to learn more.</p>
</div>
</div>
</div>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,77 @@
{% extends "devhub/docs/how-to.html" %}
{% block title %}{{ docs_page_title("Theme Development") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='how-to'), _("How-to Library")), (None, _("Theme Development"))]) }}
{% trans %}
<h2>Theme Development</h2>
<div class="primary" role="main">
<p class="hub-category-description">Style Mozilla applications the way you want with pixel-perfect themes.</p>
<h3>Getting Started</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Creating_a_Skin_for_Firefox" target="_blank">Creating a Skin for Firefox</a>
</h4>
<p>Learn how to find the right files to edit, make your changes, and package up your new theme in this tutorial.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://www.twistermc.com/blog/2006/09/22/how-to-create-a-firefox-theme/" target="_blank">How to Create a Firefox Theme</a>
</h4>
<p>Thomas McMahon explains how to create a Firefox theme from start-to-finish in this tutorial.</p>
</div>
</div>
</div>
<h3>Theme Development</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Theme_Packaging" target="_blank">Theme Packaging</a>
</h4>
<p>This article explains the packaging of themes.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="http://cheeaun.com/blog/2004/12/first-steps-in-theme-design" target="_blank">First Steps in Theme Design</a>
</h4>
<p>This blog post by Lim Chee Aun explains the use of -moz-image-region in themes.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Making_Sure_Your_Theme_Works_with_RTL_Locales" target="_blank">Making Sure Your Theme Works with RTL Locales</a>
</h4>
<p>It&#039;s important to make sure your theme works in all locales. This article explains how to tweak your theme to look great for users who browse in right-to-left.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Themes" target="_blank">Theme Documentation Index</a>
</h4>
<p>If you haven&#039;t found what you&#039;re looking for yet, try the Mozilla Developer Center&#039;s Themes section.</p>
</div>
</div>
</div>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,105 @@
{% extends "devhub/docs/how-to.html" %}
{% block title %}{{ docs_page_title("Thunderbird & Mobile Add-ons") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='how-to'), _("How-to Library")), (None, _("Thunderbird & Mobile Add-ons"))]) }}
{% trans %}
<h2>Thunderbird & Mobile Add-ons</h2>
<div class="primary" role="main">
<p class="hub-category-description">Add-ons aren&#039;t just for Firefox. Learn how to extend other Mozilla applications, such as the Thunderbird mail client and Firefox for mobile devices.</p>
<h3>Developing Add-ons for Thunderbird</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Building_a_Thunderbird_extension" target="_blank">Building a Thunderbird Extension</a>
</h4>
<p>This tutorial will take you through the steps required to build a very basic extension - one which adds a status bar panel to the Thunderbird Mail Client containing the text &quot;Hello, World!&quot;</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/En/Extensions/Thunderbird/An_overview_of_the_Thunderbird_interface" target="_blank">An Overview of Thunderbird Components</a>
</h4>
<p>This article describes the Thunderbird user interface, discusses example modifications, and introduces some of the APIs most commonly used by extension developers.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Extensions/Thunderbird/HowTos" target="_blank">Thunderbird How-tos</a>
</h4>
<p>This section contains many code samples and how-to articles on common Thunderbird extension tasks.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://developer.mozilla.org/en/Extensions/Thunderbird" target="_blank">Thunderbird Extensions Documentation Index</a>
</h4>
<p>If you can&#039;t find what you&#039;re looking for in the above articles, try the Mozilla Developer Center&#039;s Thunderbird extensions landing page.</p>
</div>
</div>
</div>
<h3>Developing Add-ons for Mobile</h3>
<div class="table-listing">
<div class="item">
<div class="main-info">
<h4>
<a href="https://wiki.mozilla.org/Mobile/Fennec/Architecture" target="_blank">Mobile Architecture</a>
</h4>
<p>This document describes the architecture of Firefox on mobile and includes performance tips for mobile code.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://wiki.mozilla.org/Mobile/Fennec/Extensions" target="_blank">Mobile Extensions</a>
</h4>
<p>This document explains the specifics on creating an extension for mobile.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://wiki.mozilla.org/Mobile/Fennec/Extensions/BestPractices" target="_blank">Best Practices for Mobile Extensions</a>
</h4>
<p>Mobile extensions have small screen space and limited resources to work with. This document explains best practices for designing and developing for a mobile environment.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://wiki.mozilla.org/Mobile/Fennec/CodeSnippets" target="_blank">Mobile Code Snippets</a>
</h4>
<p>Code snippets specific to mobile.</p>
</div>
</div>
<div class="item">
<div class="main-info">
<h4>
<a href="https://wiki.mozilla.org/Mobile/Fennec/Extensions/UserInterface" target="_blank">Designing User Interfaces for Mobile</a>
</h4>
<p>How to design an interface for your mobile extension.</p>
</div>
</div>
</div>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,95 @@
{% extends "devhub/base.html" %}
{% block title %}{{ docs_page_title("How-to Library") }}{% endblock %}
{% macro sidebar() %}
<div role="complementary" class="secondary">
<div class="highlight">
<h3>{{ _('How-to Library') }}</h3>
<ul class="xoxo">
<li>
<a href="{{ url('devhub.docs', 'how-to', 'getting-started') }}">
{{ _('Getting Started') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'how-to', 'extension-development') }}">{{ _('Extension Development') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'how-to', 'thunderbird-mobile') }}">{{ _('Thunderbird & Mobile Add-ons') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'how-to', 'theme-development') }}">{{ _('Theme Development') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'how-to', 'other-addons') }}">{{ _('Other Types of Add-ons') }}</a>
</li>
</ul>
</div>
<div class="highlight">
{% trans %}
<h3>More Resources</h3>
<ul class="xoxo">
<li>Already know what you're looking for? <a href="/en-US/developers/search">Search for it!</a></li>
<li>Browse through <a href="/en-US/developers/docs/reference">API & Language References</a> to find that interface you hope exists</li>
<li>Need help? <a href="https://forums.addons.mozilla.org">Visit our forums</a></li>
</ul>
{% endtrans %}
</div>
</div>
{% endmacro %}
{% block bodyclass %}developer-hub inverse dev-docs{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(None, _("How-to Library"))]) }}
{% trans %}
<h2>How-to Library</h2>
<p class="hub-category-description">Get add-on development guidance in a top-notch collection of tutorials, articles, and more.</p>
<div role="main" class="primary">
<div class="blocks">
<div class="block-row">
<div class="item">
<h4>
<a href="/en-US/developers/docs/how-to/getting-started">Getting Started</a></h4>
<p class="description">Learn the basics of developing an extension on the Mozilla platform with this section full of beginner&#039;s guides.</p>
</div>
<div class="item">
<h4>
<a href="/en-US/developers/docs/how-to/extension-development">Extension Development</a>
</h4>
<p class="description">Once you know the basics, these guides will help you with intermediate to advanced extension development topics.</p>
</div>
</div>
<div class="block-row">
<div class="item">
<h4>
<a href="/en-US/developers/docs/how-to/thunderbird-mobile">Thunderbird &amp; Mobile Add-ons</a>
</h4>
<p class="description">Add-ons aren&#039;t just for Firefox. Learn how to extend other Mozilla applications, such as the Thunderbird mail client and Firefox for mobile devices.</p>
</div>
<div class="item">
<h4>
<a href="/en-US/developers/docs/how-to/theme-development">Theme Development</a>
</h4>
<p class="description">Style Mozilla applications the way you want with pixel-perfect themes.</p>
</div>
</div>
<div class="block-row">
<div class="item">
<h4>
<a href="/en-US/developers/docs/how-to/other-addons">Other Types of Add-ons</a>
</h4>
<p class="description">Find information on Search Plug-ins, Jetpack, Personas, and other types of add-ons here.</p>
</div>
</div>
</div>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,284 @@
{% extends "devhub/docs/policies.html" %}
{% block title %}{{ docs_page_title("Developer Agreement") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='policies'), _("Add-on Policies")), (None, _("Developer Agreement"))]) }}
<h2>{{ _('Developer Agreement') }}</h2>
<div class="primary" role="main">
<!-- Not in a trans block on purpose; we don't want to get into
any legal ambiguities between the english version and a translation. -->
<div id="dev-agreement" class="rounded">
<p>Last Update: <strong>October 14, 2010</strong></p>
<p>
If you upload or otherwise make available add-on software, Firefox "persona"
designs or any other information or material
(each an &#8220;<strong><abbr title="addons.mozilla.org">AMO</abbr>
Contribution</strong>&#8221;) by means of the services provided by Mozilla
Corporation (&#8220;<strong>Mozilla</strong>&#8221;) via the
addons.mozilla.org website or any of its subdomains (&#8220;<strong>AMO
Services</strong>&#8221;), you (the &#8220;<strong>Contributor</strong>&#8221;)
and the AMO Contribution are subject to the following terms, as well as
Mozillas Privacy Policy,
<a href="http://www.mozilla.com/en-US/about/legal.html">web site notices</a>
and other policies, guidelines or requirements that may be posted on an AMO
Services web site (the &#8220;<strong>Terms</strong>&#8221;). By acting as a
Contributor, you agree to these Terms. If you are an individual acting as a
representative of a corporation or other legal entity that wishes to use any
AMO Services, you represent and agree that you accept the Terms on behalf of
such entity. If you have any questions about these terms or the AMO Service,
please email:
<a href="mailto:amo-admins@mozilla.org">amo-admins@mozilla.org</a>
</p>
<ol>
<li>
<p>
<strong>Responsibility Re AMO Contributions.</strong>
You represent and warrant that:
</p>
<ul>
<li>
if any information about the user or usage of the AMO Contribution is
collected or transmitted outside of the user's computer, the details of this
collection will be provided in the description of the AMO Contribution and
you will provide a link to a privacy policy detailing how the information is
managed and protected;
</li>
<li>
the descriptions and other data you provide about the AMO Contribution are
true to the best of your knowledge;
</li>
<li>
if the AMO Contribution is an add-on, such add-on is accompanied by an
accessible license that describes the rights of users; and
</li>
<li>
you have all the legal rights needed to post and transmit your AMO Contribution
over the web as well as the rights to authorize your AMO Contribution's further
use and transmission by others (such as Mozilla). By this representation, you mean that:
<ul>
<li>
you are the owner of the copyright and all other rights in the
artwork, designs and software code contained in your AMO
Contribution; or you have a worldwide license to all copyright
rights needed to reproduce, transmit and authorize the reproduction
and transmission of the artwork, designs and software code contained
in your AMO Contribution; or you have a right worldwide to all of
the foregoing under a legal doctrine, such as fair use; AND
</li>
<li>
To the extent the AMO Contribution contains any commercial identifiers
such as a trademark, service mark, or trade dress, you have worldwide
rights to use and to authorize the use of the artwork, designs,
emblems, names, and other elements under the law (such as under fair
use principles); AND
</li>
<li>
To the extent the AMO Contribution contains any name, likeness, signature,
address, telephone number, contact or location information, voice, or
image of a person, you are that person or have full rights to the use of,
and the authorization of further uses of, the name, likeness, signature,
address, telephone number, contact or location information, voice, or
image of that person in the AMO Contribution; AND
</li>
<li>
the AMO Contribution does not, and the exercise of the rights granted under
these Terms will not, violate any other applicable law or regulation nor
infringe, misappropriate or otherwise violate any other rights of any third party.
</li>
</ul>
</li>
</ul>
</li>
<li>
<p>
<strong>Licenses.</strong>
In order to provide the AMO Service, you grant to Mozilla and its
affiliates a non-exclusive, worldwide, royalty-free, sublicensable license
to distribute, transmit, reproduce, publish, publicly and privately
perform and display and otherwise use the AMO Contribution, including any
updates, solely in connection with Mozillas provision of the AMO
Services. Mozilla and its affiliates may also (i) bundle and/or package,
and permit users to bundle and/or package, your AMO Contribution
with third party AMO Contributions for delivery and promotion of the AMO
Contributions to users; (ii) maintain and/or update your AMO
Contribution for the purpose of providing compatibility with current and
new versions of Firefox or other Mozilla software that the AMO
Contribution interoperates with and (iii) include your name, logo and/or
AMO Contribution title in menus and other categories relating to the
selection of AMO Contributions.
</p>
</li>
<li>
<p>
<strong>Management of AMO Services.</strong>
Mozilla may manage the AMO Services in a manner designed to facilitate the
integrity and proper functioning of the AMO Services without limitation or
liability. The following is a list of exemplary activities that Mozilla in
its sole discretion may undertake as part of its management of the AMO
Services: (i) monitor, test and review AMO Contributions; (ii) remove or
disable AMO Contributions or change their listing or description; (iii)
move an AMO Service and related AMO Contributions to a new domain or
website; (iv) rate limit, throttle and/or block requests or access to any
AMO Service; (v) use, modify or remove authentication requirements for
access to AMO Services; and (vi) collect statistics and other data
regarding your AMO Contribution, which may be made publicly available
through the AMO API (as described below).
</p>
</li>
<li>
<p>
<strong>AMO <abbr title="Application Programming Interface">API</abbr>.</strong>
As part of the AMO Services, Mozilla provides the addons.mozilla.org API
(&#8220;<strong>AMO API</strong>&#8221;), which allows you to get
information about certain AMO Contributions distributed by Mozilla via the
AMO Service and is currently served via calls to
https://services.addons.mozilla.org/api/.
You may use the AMO API solely to retrieve data made publicly available by
Mozilla via the AMO API, which data may be used solely for your own
reasonable business purposes or personal use. In addition to the
restrictions otherwise set forth in the Terms regarding AMO Services
generally, you agree that you are responsible for your use of and
contribution to the AMO API and you will not:
</p>
<ul>
<li>
hide or mask from Mozilla the identity of your service as it uses the
AMO API, including by failing to follow required identification
conventions; or
</li>
<li>
use the AMO API for any application that replicates or attempts to
replicate the Mozilla AMO Service or experience
unless your use of the AMO API is non-confusing. By non-confusing,
Mozilla means that people should always know with whom they are dealing
and where the information or software they are downloading came from.
Websites and software that are not produced by Mozilla shouldnt imply,
either directly or by omission, that they are.
</li>
</ul>
<br />
</li>
<li>
<p>
<strong>Firefox Sync Add-ons.</strong>
If your AMO Contribution utilizes any Firefox Sync (formerly Weave) APIs
or software, you agree (a) that you and your AMO Contribution will use
the Firefox Sync APIs solely for their intended purpose; (b) that your
AMO Contribution will not hide or mask its identity as it uses Mozillas
hosted Firefox Sync services and/or Firefox Sync APIs, including by
failing to follow required identification conventions; and (c) that
you and your AMO Contribution will not use the Firefox Sync APIs for
any application or service that replicates or attempts to replicate
Mozillas hosted Firefox Sync services or experience unless such use
is non-confusing. Your AMO Contribution shall not imply, either directly
or by omission, that it is produced or endorsed by Mozilla.
</p>
</li>
<li>
<p>
<strong>Ownership, Reservation of Rights.</strong>
You are welcome to use the AMO Services subject to these Terms, and
Mozilla grants you the right to do so. Mozilla and its licensors reserve
all other rights in the AMO Services. Further, nothing in the Terms shall
be deemed to grant you any right to use the trademarks, trade names,
service marks, or trade dress of Mozilla or its licensors and Mozilla
hereby reserves all right, title and interest therein. For information on
our trademarks, please see our
<a href="http://www.mozilla.org/foundation/trademarks/">Trademark and Logo Usage Policies</a>.
</p>
</li>
<li>
<p>
<strong>
The AMO Services are provided &#8220;as-is&#8221;. Mozilla, its
contributors, licensors, and distributors, disclaim all warranties,
whether express or implied, including without limitation, implied
warranties of merchantability, fitness for a particular purpose and
non-infringement. Some jurisdictions do not allow the exclusion or
limitation of implied warranties, so this disclaimer may not apply to
you.
</strong>
</p>
</li>
<li>
<p>
<strong>
Except as required by law, Mozilla, its contributors, licensors, and
distributors will not be liable for any indirect, special, incidental,
consequential, punitive, or exemplary damages arising out of or in any way
relating to the use of AMO Services and their collective liability
under these Terms will not exceed $500 (five hundred dollars). Some
jurisdictions do not allow the exclusion or limitation of certain damages,
so this exclusion and limitation may not apply to you.
</strong>
</p>
</li>
<li>
<p>
<strong>Changes to the Terms.</strong>
Mozilla may update these Terms as necessary from time to time. These Terms
may not be modified or cancelled without Mozillas written agreement.
</p>
</li>
<li>
<p>
<strong>Eligibility.</strong>
You represent that you are of legal age to form a binding contract and
that you are not a person barred from receiving or using the AMO Services
under the laws of any country, including the country in which you are
resident or from which you use the AMO Services.
</p>
</li>
<li>
<p>
<strong>Export Control.</strong>
Export and import laws, restrictions, and regulations of the United States
and other foreign agencies may apply.
</p>
</li>
<li>
<p>
<strong>Miscellaneous.</strong>
These Terms are governed by the laws of the state of California, U.S.A.,
excluding its conflict of law provisions. If any portion of these Terms is
held to be invalid or unenforceable, the remaining portions will remain in
full force and effect. In the event of a conflict between a translated
version of these Terms and the English language version, the English
language version shall control. Mozillas subsidiaries and affiliates
shall be third party beneficiaries of these Terms, entitled to enforce and
rely upon the provisions hereof.
</p>
</li>
<li>
<p>
<strong>Termination.</strong>
You may terminate your use of the AMO Services at any time. Mozilla may
modify or discontinue the AMO Services at its sole discretion.
</p>
</li>
</ol>
</div>
<p id="license-disclosure"></p>
</div>
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,30 @@
{% extends "devhub/docs/policies.html" %}
{% block title %}{{ docs_page_title("Contacting Us") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='policies'), _("Add-on Policies")), (None, _("Contacting Us"))]) }}
{% trans %}
<h2>Contacting Us</h2>
<div class="primary" role="main">
<p>Thanks for your interest in contacting the Mozilla Add-ons team. Please read this page carefully to ensure your request goes to the right place.</p>
<h4 id="section-support">Add-on Support</h4>
<p>If you have a support question about a particular add-on, such as "how do I use this add-on?" or "why doesn't this work properly?", please contact that add-on's author through the support channels listed on the add-on's listing page.</p>
<h4 id="section-editorial">Add-on Editorial Concerns</h4>
<p>If you have a question about an Editor's review of an add-on or want to report a policy violation, please email <span id="41f7aaa48aa8fa29c5ec862e7bab3670" class="email">amo-editors at mozilla dot org</span>
<script language="JavaScript">emailLink('41f7aaa48aa8fa29c5ec862e7bab3670', 'amo-editors', 'mozilla.org');</script>
. <strong>Almost all add-on reports fall under this category.</strong> Please be sure to include a link to the add-on in question and a detailed description of your question or comment.</p>
<h4 id="section-security">Add-on Security Vulnerabilities</h4>
<p>If you have discovered a security vulnerability in an add-on, even if it is not hosted here, Mozilla is very interested in your discovery and will work with the add-on developer to correct the issue as soon as possible. Add-on security issues can be reported <a href="http://www.mozilla.org/projects/security/security-bugs-policy.html">confidentially</a> in <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=addons.mozilla.org&amp;component=Add-on&#37;20Security&amp;maketemplate=Add-on&#37;20Security&#37;20Bug&amp;bit-23=1&amp;rep_platform=All&amp;op_sys=All">Bugzilla</a> or by emailing <span id="875404d9a37c3a65471d2d33138df06d" class="email">amo-admins at mozilla dot org</span>
<script language="JavaScript">emailLink('875404d9a37c3a65471d2d33138df06d', 'amo-admins', 'mozilla.org');</script>
.</p>
<h4 id="section-website">Website Functionality & Development</h4>
<p>If you've found a problem with the site, we'd love to fix it. Please <a href="https://bugzilla.mozilla.org/enter_bug.cgi?product=addons.mozilla.org">file a bug report</a> in Bugzilla, including the location of the problem and how you encountered it.</p></div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,54 @@
{% extends "devhub/docs/policies.html" %}
{% block title %}{{ docs_page_title("Maintaining Your Add-ons") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='policies'), _("Add-on Policies")), (None, _("Maintaining Your Add-ons"))]) }}
{% trans base_docs=url('devhub.docs'), link_guidelines=remora_url('/pages/review_guide') %}
<h2>Maintaining Your Add-ons</h2>
<div class="primary" role="main">
<!-- Be sure to update the Last Updated date at the bottom when making changes -->
<h3>Submitting New Versions of Your Add-on</h3>
<p>Developers are encouraged to submit updates to their add-ons to fix bugs, add features, and otherwise improve their product. New versions of an add-on must have a <a href="https://developer.mozilla.org/en/Toolkit_version_format">higher version number</a> and can be submitted through the Developer Tools provided. There is no limit to the number of versions that can be submitted, but please remember that versions must be reviewed by an editor.</p>
<p>New versions will be added to a pending review queue, and any additional versions submitted before the review is completed will move that version to the end of the queue.</p>
<h4 id="beta-addons">How do I submit a Beta add-on?</h4>
<p>Beta channels are only available to fully-reviewed add-ons.</p>
<p>To create a beta channel, upload a file with a unique version string that contains any of the following strings: <code>a,b,alpha,beta,pre,rc</code>, with an optional number at the end. This text must come at the end of the version string. If you understand regex format, here's what we look for in the version number: <code>"(a|alpha|b|beta|pre|rc)\d*$"</code>.</p>
<p>Once a file meeting this criteria is uploaded to AMO, it will automatically be marked as a beta version. Users of add-ons with these unique version numbers will automatically be served the newest beta updates.</p>
<p>While we call these "Beta versions", you can use this channel for nightlies, or alphas, or prerelease versions as you wish. Please note that there is only one channel for this purpose and all of your users on this channel will receive the latest add-ons submitted. For instance, if you upload <code>1.0beta1</code> to the release channel and then upload <code>1.1alpha1</code>, all users of <code>1.0beta1</code> will be offered an upgrade to <code>1.1alpha1</code>. Updates are pushed by submission date and not version number, so users will always get the most recent channel update regardless of any kind of alphabetical sorting.</p>
<h3 id="section-required">Required Updates</h3>
<p>Certain situations may arise in which Mozilla requests that an add-on developer update their add-on within a given time period to address a major security issue or policy violation. We work with developers to reasonably accommodate their own schedules, but if the issue is of a serious enough nature, add-ons that cannot issue an update with the requested fix may be demoted from fully-reviewed status, disabled, or permanently removed from the site.</p>
<h3 id="section-transfer">Transfer of Ownership</h3>
<p>Add-ons can have multiple users with permission to update and manage the listing. Existing authors of an add-on can transfer ownership and add additional developers to an add-on's listing through the Developer Tools provided. No interaction with Mozilla representatives is necessary for a transfer of ownership.</p>
<p>Mozilla can assist with granting additional permissions of an add-on's listing if <a href="{{ base_docs }}policies/contact">contacted</a> by the add-on's current owner.</p>
<h3 id="section-reviews">User Reviews</h3>
<p>Mozilla encourages its users to offer feedback on their experiences when using an add-on. This allows other users to determine if the add-on is stable and useful. It also provides valuable feedback to developers, allowing them to continuously improve their add-on to meet user needs.</p>
<p>Reviews must follow the <a href="{{ link_guidelines }}">review guidelines</a>. Reviews that do not meet these guidelines may be flagged for moderation, but negative reviews will not be removed unless they provide false information.</p>
<p>Many developers provide a support mechanism, such as a forum, discussion group, <a href="http://www.getsatisfaction.com">GetSatisfaction account</a>, or email address. It is recommended that support questions be posted via those mediums instead of in an add-on's review section.</p>
<h3 id="section-disputes">Code Disputes</h3>
<p>Many add-ons allow their source code to be openly viewed. This does not mean that the source code is open source or available for use in another add-on. The original author of an add-on retains copyright of their work unless otherwise noted in the add-on's license.</p>
<p>In the event that we're notified of a copyright or license infringement, we will take steps to review the situation and determine if an actual infringement has occurred. If we determine that there is an infringement, we will remove the offending add-on and contact the author. New add-on submissions (including updates) containing infringing code will be denied approval for public status.</p>
<p>If you are unsure of the current copyright status of an add-on's source code, you must contact the original author and receive explicit permission before using the source code.</p>
<p><em>Last updated: January 13, 2011</em></p>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,46 @@
{% extends "devhub/docs/policies.html" %}
{% block title %}{{ docs_page_title("Featured Add-ons") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='policies'), _("Add-on Policies")), (None, _("Featured Add-ons"))]) }}
{% trans base_docs=url('devhub.docs'), link_gallery=url('browse.featured') %}
<h2>Featured Add-ons</h2>
<div class="primary" role="main">
<!-- Be sure to update the Last Updated date at the bottom when making changes -->
<h3 id="section-whatis">What are featured add-ons?</h3>
<p>Featured add-ons are top-quality add-ons highlighted in our <a href="{{ link_gallery }}">gallery</a>, Firefox's Add-ons Manager, <a href="http://www.rockyourfirefox.com">Rock Your Firefox</a>, and across other Mozilla websites. These add-ons showcase the power of Firefox customization and are useful to a wide audience of consumers.</p>
<h3 id="section-inclusion">How can my add-on become featured?</h3>
<p>Featured add-ons must be high quality, safe, trustworthy, fast, useful, have wide appeal, and provide a great user experience. These factors are all taken into account when reviewing an add-on to be featured. (see <a href="http://blog.fligtar.com/2010/07/02/making-add-ons-people-will-love/">Making Add-ons People Will Love</a> for tips on best practices)</p>
<p>Featured add-ons should have excellent user reviews and prompt responses from the developer for any concerns or support issues. Additionally, add-ons should have gained some level of popularity on their own merit, usually with a minimum of 15,000 active daily users.</p>
<p>If your add-on meets the criteria above and is hosted in our gallery, please email <a href="mailto:amo-featured@mozilla.org">amo-featured@mozilla.org</a> with:</p>
<ul>
<li>details on your add-on, including its URL</li>
<li>an explanation of why your add-on has wide appeal and should be featured</li>
<li>links to any external reviews of your add-on</li>
</ul>
<h4 id="section-rotation">Featured Add-on Rotation</h4>
<p>Mozilla regularly evaluates and rotates featured add-ons. Some of the most common reasons for add-ons being removed from the featured list are:</p>
<ul>
<li>Lack of growth &mdash; Add-ons that are featured typically experience a substantial gain in both downloads and active users. If an add-on is not demonstrating growth in any substantial way, that's a good indicator that the add-on may not be that useful to our users.</li>
<li>Negative reviews &mdash; Featured add-ons should have a great experience and very few bugs, so add-ons with many negative reviews may be reconsidered.</li>
<li>Incompatibility with upcoming Firefox versions &mdash; Featured add-ons are expected to be compatible with upcoming releases of Firefox by the release candidate stage. Add-ons not yet compatible with the release candidates of a major version of Firefox will lose their featured status.</li>
</ul>
<p><em>Last updated: October 27, 2010</em></p>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,148 @@
{% extends "devhub/docs/policies.html" %}
{% block title %}{{ docs_page_title("Review Process") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='policies'), _("Add-on Policies")), (None, _("Review Process"))]) }}
{% trans base_docs=url('devhub.docs'), link_validation=remora_url('/pages/validation') %}
<h2>Review Process</h2>
<div class="primary" role="main">
<!-- Be sure to update the Last Updated date at the bottom when making changes -->
<p>In order to ensure all add-ons hosted in our gallery are safe for users to install, Mozilla will begin requiring all hosted add-ons to undergo review. We offer two types of review and developers are free to choose the best fit for their add-on.
<ul>
<li><strong><a href="#full">Full Review</a></strong> &mdash; a thorough functional and code review of the add-on, appropriate for add-ons ready for distribution to the masses. All site features are available to these add-ons.</li>
<li><strong><a href="#preliminary">Preliminary Review</a></strong> &mdash; a faster review intended for experimental add-ons. Preliminary reviews do not check for functionality or full policy compliance, but the reviewed add-ons have install button cautions and some feature limitations.</li>
</ul>
<p>Detailed descriptions of each option are below. After selecting a review process at submission, the add-on will be placed in the queue. Add-ons are reviewed by the <a href="https://wiki.mozilla.org/AMO:Editors">AMO Editors</a>, a group of talented developers that volunteer to help the Mozilla project by reviewing add-ons to ensure a stable and safe experience for users. Developers will receive an email with any updates throughout the review process.</p>
<p>While waiting for review, add-ons will not appear anywhere in the gallery publicly, but direct links to the add-on's details page will work. This allows the author to blog or share the link with friends, inviting them to try it out, even when not yet reviewed.</p>
<h3 id="full">Full Review</h3>
<p>Full reviews are appropriate for add-ons that are well-tested, stable, fast, and have wide appeal to our users. If you aren't confident that your add-on meets that criteria, please consider working out the kinks while in preliminary review and accumulating user feedback first.</p>
<p>We aim to perform full reviews in under 10 days, though most add-ons are reviewed in much less time.</p>
<h4 id="full-testing">Testing Methods &amp; Common Issues</h4>
<p>When performing a full review, editors will:</p>
<ul>
<li>install the add-on, making sure it functions as described and is free of major defects</li>
<li>perform a source code review, looking for performance and security best practices</li>
<li>ensure the add-on's privacy policy is in line with its functionality</li>
<li>look for compliance with all of Mozilla's policies, detailed in these documents</li>
</ul>
<p>Some of the most common issues we see when performing these reviews are:</p>
<ul>
<li><strong>JavaScript namespace pollution</strong> &mdash; the most common violation. Be sure to <a href="https://developer.mozilla.org/en/XUL_School/JavaScript_Object_Management">wrap your loose variables</a></li>
<li>proper preference naming - all preference names should begin with "extensions.", followed by the add-on name or some other unique identifier</li>
<li>remote JavaScript execution or injection</li>
<li>remote XUL</li>
<li>synchronous XMLHttpRequests</li>
<li>obfuscated code</li>
<li>binary components or executables</li>
<li>inclusion of third-party software</li>
<li>errors generated in the Error Console</li>
<li>memory leaks</li>
<li>possible conflicts with other add-ons</li>
<li>application start-up or page load performance degradation</li>
</ul>
<p>For information on how to avoid these problems, please see our <a href="{{ base_docs }}how-to">How-to Library</a>. Some of these practices, such as binary or obfuscated code, are allowed under certain conditions outlined below.</p>
<p>Many of the above restrictions are tested automatically by an extension scanner that will flag suspicious add-ons for editor review. You can read more about this scanner in the <a href="{{ link_validation }}">Validation Help</a> document.</p>
<p>If the add-on is site-specific, it is recommended that a test account is provided for use during the review process. Additionally, including detailed testing instructions will allow an editor to better understand how the add-on functions and expedite the testing process. This information can be placed in the Notes to Reviewer field when editing a version in the Developer Hub.</p>
<h4 id="full-after">After the Review</h4>
<p>Once an add-on is granted full review, it will immediately be available in the gallery, showing in browse and search results with a warning-free install button. All features, including voluntary contributions and beta channels will be available.</p>
<p>Subsequent versions of the add-on will automatically be placed in the full review queue. Until the review is completed, the new version will only be displayed on the Version History page of the add-on. Once reviewed, the version will be updated across the site and deployed through the automatic update service.</p>
<p>If a version does not meet the criteria for full review, it can either be granted preliminary review or disabled if there is a security concern. The author will receive an email explaining the action taken and how to fix it. In most cases, the developer can simply fix the problem and re-submit for full review.</p>
<h3 id="preliminary">Preliminary Review</h3>
<p>Preliminary reviews are appropriate for experimental add-ons and provide a way to get user testing and feedback without going through the longer, more thorough review process. We aim to complete these reviews in under 3 days.</p>
<h4 id="preliminary-testing">Testing Methods</h4>
<p>When performing a preliminary review, editors will review the source code for security issues and major policy violations, but will not install the add-on to test functionality in most cases. Preliminary review will be granted unless a security vulnerability or major policy violation is discovered.
<h4 id="preliminary-after">After the Review</h4>
<p>Once preliminary review is granted, the add-on will be immediately available in the gallery, showing in browse and search results but ranked lower than fully-reviewed add-ons. Install buttons will have caution stripes and a notice that the add-on is experimental and not fully reviewed by Mozilla, though no click-through is required. Additionally, these add-ons cannot use the voluntary contributions and beta channel features.</p>
<p>After being granted preliminary review, Mozilla may later revoke the review if other serious problems are reported to us by users.</p>
<p>Subsequent versions of the add-on will automatically be placed in the preliminary review queue. Until the review is completed, the new version will only be displayed on the Version History page of the add-on. Once reviewed, the version will be updated across the site and deployed through the automatic update service.</p>
<h3 id="section-policies">Policies on Specific Add-on Practices</h3>
<h4 id="section-prohibited">Prohibited Add-ons</h4>
<p>The following add-ons are not permitted in any form:</p>
<ul>
<li>Add-ons that embed known <a href="http://en.wikipedia.org/wiki/Spyware">spyware</a> or <a href="http://en.wikipedia.org/wiki/Malware">malware</a></li>
<li>Illegal and criminal add-ons, such as <a href="http://en.wikipedia.org/wiki/Click_fraud">click fraud</a> generators, <a href="http://en.wikipedia.org/wiki/Warez">warez</a> download and directory assistants, child pornography finders, etc.</li>
<li>Add-ons whose main purpose is to facilitate access to pornographic material, or include references to this material in their descriptions</li>
<li>Add-ons that, upon installation, auto-install or launch installers of non-Firefox software</li>
<li>Add-ons that provide their own update mechanism for code or search engines</li>
<li>Add-ons that make changes to web content in ways that are non-obvious or difficult to trace by their users</li>
<li>Add-ons that snoop on or intercept the network traffic of other users</li>
<li>Conduit-based toolbars without explicit pre-approval</li>
</ul>
<h4 id="section-defaults">Changing of Defaults and Unexpected Features</h4>
<p>Surprises can be appropriate in many situations, but they are not welcome when user security, privacy, and control are at stake. It is extremely important to be as transparent as possible when submitting an add-on for hosting on this site. A Mozilla user should be able to easily discern what the functionality of an add-on is and not be presented with unexpected experiences post-install.</p>
<p>Whenever an add-on includes any unexpected* feature that</p>
<ul>
<li>compromises user privacy or security (like sending data to third parties),</li>
<li>changes default settings like the homepage or search engine, or</li>
<li>changes settings or features in other add-ons or deactivates them altogether</li>
</ul>
<p>the features must adhere to the following requirements:</p>
<ul>
<li>The add-on description must clearly state what changes the add-on makes.</li>
<li>All changes must be opt-in, meaning the user must take non-default action to enact the change.</li>
<li>The opt-in dialog must clearly state the name of the add-on requesting the change.</li>
<li>Uninstalling the add-on restores the user's original settings if they were changed.</li>
</ul>
<p>*Unexpected features are those that are unrelated to the add-on's primary function.</p>
<p>These features cannot be introduced into an update of a fully-reviewed add-on; the opt-in change process must be part of the initial review.</p>
<p>These are minimum requirements and not a guarantee that the add-on will be approved. This section applies to all add-ons hosted on the site, including preliminarily reviewed add-ons.</p>
<h4 id="section-private-browsing">Private Browsing Mode</h4>
<p>Add-ons that store or otherwise handle browsing data must support <a href="https://developer.mozilla.org/En/Supporting_private_browsing_mode">Private Browsing Mode</a>.
During a Private Browsing session, no browsing data can be written to disk, and all of this data must be cleared when Firefox quits or the Private Browsing session ends.</p>
<h4 id="section-binary">Binary Components & Obfuscated Code</h4>
<p>Add-ons may contain binary, obfuscated and minified source code, but Mozilla must be allowed to review a copy of the human-readable source code of each version of an add-on submitted for review. These add-ons are ineligible for preliminary review and must choose the full review process.</p>
<p>If an add-on contains binary or obfuscated source code, the author will receive a message when the add-on is reviewed indicating whom to contact at Mozilla to coordinate review of the source code. This code will be reviewed by an administrator and will not be shared or redistributed in any way. The code will only be used for the purpose of reviewing the add-on.</p>
<p>If your add-on contains binary or obfuscated code that you don't own or can't get the source code for, you may
<a href="{{ base_docs }}policies/contact">contact us</a> for information on how to proceed.</p>
<p><em>Last updated: January 13, 2011</em></p>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,47 @@
{% extends "devhub/docs/policies.html" %}
{% block title %}{{ docs_page_title("Submission Process") }}{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(url('devhub.docs', doc_name='policies'), _("Add-on Policies")), (None, _("Submission Process"))]) }}
{% trans %}
<h2>Submission Process</h2>
<div class="primary" role="main">
<!-- Be sure to update the Last Updated date at the bottom when making changes -->
<h3 id="section-criteria">Criteria for Submission</h3>
<p>Add-ons hosted on Mozilla Add-ons should be of high quality and give users an improved web experience. We look for the following things when deciding whether an add-on is appropriate to be public and unrestricted:</p>
<p><strong>Are you responsive?</strong> We expect that an author who is promoting their add-on to our applications' many users is responsive to problem reports, maintains their contact information, and updates their add-on promptly to keep current with Firefox releases and changes in our policies. This doesn't mean that you have to reply to every question that someone posts in the discussions, or that you even need to fix every bug, but we do expect that you will respond to issues in a manner that's appropriate to the severity of the issue in question.</p>
<p><strong>Is the add-on clearly and accurately described?</strong> It's of the utmost importance to us that users get what they expect when they try a new add-on. Your add-on name should be clear and concise, and you should refrain from using special characters or numbers to get higher search rankings or for decorative purposes. Your description should provide details about what the add-on does, how a user should take advantage of it, and what the user should expect when they install it. Links to external documents for detailed instructions are fine, but the description itself should cover the basics and leave users confident that they know what they'll get. Also, it is important that you maintain version notes appropriately as you improve and change your add-on. Users should be able to see what's new in an add-on they may have tried previously, and should be made aware of changes that might affect their current use of the add-on when they update.</p>
<p><strong>Are all privacy and security concerns clearly spelled out?</strong> This is an aspect of a clear and accurate description, but such an important one that we feel it deserves specific mention. Many very useful and well-written add-ons manipulate some form of user data, or can present security hazards if misused; they are welcome on the site, but they must make it very clear to users what risks they might encounter, and what they can do to protect themselves.</p>
<p><strong>Has the add-on been well-tested, and is it free of obvious or serious defects?</strong> One important thing that we look for when considering an add-on is whether its user reviews indicate that it has received thorough testing, and that it doesn't have serious problems or negative impacts on the browser. If reviewers report problems such as major performance issues, crashes, frequent problems using the functions of the add-on, or spamming of messages to the error console, you should take those reports to heart, and re-submit your add-on after you've addressed them as best you can. We don't expect you to perfectly optimize or have zero bugs &mdash; Firefox itself undergoes constant improvement in these areas &mdash; but we do want you to take reasonable efforts to minimize downsides, and to clearly call out cases where users may be surprised by those that remain.</p>
<p><strong>Do the add-on and add-on author both treat the user respectfully?</strong> Your software should not intrude on the user unnecessarily, try to trick the user, or conceal any of its activities from the user. Users (or even non-users) are sometimes rude in their comments, and while we will do our best to filter out inaccurate reviews as they're reported to us, we do expect that authors will avoid retaliating with rudeness of their own.</p>
<p><strong>Is the add-on useful to an appropriately wide portion of Firefox's users?</strong> Your add-on doesn't need to be the next Greasemonkey or Firebug, but if it is only useful to people at your company or who are part of a small web community, we may feel that it's not yet appropriate to put it in front of all of our users.</p>
<p>We are constantly looking at ways to improve the organization of the site to better accommodate add-ons that are exemplary in other ways, but are aimed at only a small community of potential users. Correctly categorizing and maintaining the metadata of your add-on will help us figure out how we can surface more of those sorts of add-ons to people who are most likely to benefit from them.</p>
<p>If your add-on just provides bookmarks or other simple access points to your site, it's probably not appropriate for the gallery. Like the rest of the Mozilla project, we love web applications and new web services, but Firefox add-ons should provide an improved browsing experience for the user and not just be a way to promote a new site or service through a Mozilla Add-ons listing.</p>
<p><strong>Is the add-on free of unlicensed trademarks and copyrights?</strong> Though you may mean no harm to the holder of a trademark, or the owner of a copyrighted work, we can't host add-ons that infringe on trademarks or copyrights. If you don't have permission to use a trademarked name or image, please do not submit your add-on to us. If your add-on includes code that is copyrighted by someone else, and is not licensed to you to use in your add-on, please do not submit your add-on to us.</p>
<p>In terms of reuse of source code from other add-ons, if the author has not clearly stated that you are permitted to use his or her code in your own work &mdash; such as by placing it under an open source license &mdash; then you should assume that you do not have the right to do so. You can contact the author to seek such permission, but we can't provide you with any special rights to it just because it's listed on the site, or because the author isn't responding to your request.</p>
<p>This applies to the Mozilla Foundation's trademarks as well, including "Mozilla", "Firefox", and "Thunderbird". The Mozilla policy on trademark use is designed to protect against confusion, and prevent the trademarks from being overturned due to lack of protection; please respect the need for such protection, and help us preserve some of the most valuable assets of the Mozilla Foundation.</p>
<h3 id="section-licensing">Licensing</h3>
<p>Selecting an appropriate license for your add-on is a very important step in the submission process. A license specifies the rights you grant on your source code and is important in protecting your intellectual property.</p>
<p>During the add-on submission process, you will be presented with a list of popular licenses to choose from, as well as the ability to specify your own license. It is best to consult with a legal professional about which license option is best for you. Choosing the right license for your source code will help to prevent confusion and code conflicts in the future.</p>
<p><em>Last updated: January 13, 2011</em></p>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,97 @@
{% extends "devhub/base.html" %}
{% block title %}{{ docs_page_title("Add-on Policies") }}{% endblock %}
{% macro sidebar() %}
<div class="secondary" role="complementary">
<div class="highlight">
<h3>{{ _('Add-on Policies') }}</h3>
<ul class="xoxo">
<li>
<a href="{{ url('devhub.docs', 'policies', 'submission') }}">{{ _('Add-on Submission') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'policies', 'reviews') }}">{{ _('Review Process') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'policies', 'maintenance') }}">{{ _('Maintaining Your Add-on') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'policies', 'recommended') }}">{{ _('Featured Add-ons') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'policies', 'agreement') }}">{{ _('Developer Agreement') }}</a>
</li>
<li>
<a href="{{ url('devhub.docs', 'policies', 'contact') }}">{{ _('Contacting Us') }}</a>
</li>
</ul>
</div>
</div>
{% endmacro %}
{% block bodyclass %}developer-hub dev-docs inverse{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(None, _("Add-on Policies"))]) }}
{% trans base_docs=url('devhub.docs') %}
<h2>Add-on Policies</h2>
<div class="primary" role="main">
<p class="hub-category-description">Mozilla is committed to ensuring a great add-ons experience for our users and developers. Please review the policies below before submitting your add-on.</p>
<div class="blocks">
<div class="block-row">
<div class="item">
<h4>
<a href="{{ base_docs }}policies/submission">Add-on Submission</a>
</h4>
<p class="description">Find out what is expected of add-ons we host and our policies on specific add-on practices.</p>
</div>
<div class="item">
<h4>
<a href="{{ base_docs }}policies/reviews">Review Process</a>
</h4>
<p class="description">What happens after your add-on is submitted? Learn about how our Editors review submissions.</p>
</div>
</div>
<div class="block-row">
<div class="item">
<h4>
<a href="{{ base_docs }}policies/maintenance">Maintaining Your Add-on</a>
</h4>
<p class="description">Add-on updates, transferring ownership, user reviews, and what to expect once your add-on is approved.</p>
</div>
<div class="item">
<h4>
<a href="{{ base_docs }}policies/recommended">Featured Add-ons</a>
</h4>
<p class="description">How up-and-coming add-ons become featured and what&#039;s involved in the process.</p>
</div>
</div>
<div class="block-row">
<div class="item">
<h4>
<a href="{{ base_docs }}policies/agreement">Developer Agreement</a>
</h4>
<p class="description">Terms of Service for submitting your work to our site. Developers are required to accept this agreement before submission.</p>
</div>
<div class="item">
<h4>
<a href="{{ base_docs }}policies/contact">Contacting Us</a>
</h4>
<p class="description">How to get in touch with us regarding these policies or your add-on.</p>
</div>
</div>
</div>
</div>
{% endtrans %}
{{ sidebar() }}
{% endblock %}

Просмотреть файл

@ -0,0 +1,144 @@
{% extends "devhub/base.html" %}
{% block title %}{{ docs_page_title("API & Language References") }}{% endblock %}
{% block bodyclass %}developer-hub inverse dev-docs{% endblock %}
{% block content %}
{{ docs_breadcrumbs(items=[(None, _("API & Language References"))]) }}
{% trans %}
<div class="primary" role="main">
<h2>API &amp; Language References</h2>
<p class="summary">
The official documentation on APIs and languages. What you need, when you need it, to create your masterpiece. </p>
<h3 id="ref-xul">XUL: Defining User Interfaces</h3>
<ul class="reflist rounded graybox">
<li><a class="refname" href="https://developer.mozilla.org/en/XUL">XUL Overview</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>XUL (XML User Interface Language) is Mozilla's XML-based language that lets you build feature-rich cross platform applications that can run connected or disconnected from the Internet.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/XUL_Reference">XUL Reference</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>A list of all available XUL elements.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/XUL_controls">XUL Controls List</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>A description of many available XUL controls, including screenshots.</p>
</li>
</ul>
<h3 id="ref-js">JavaScript: Specifying Behavior</h3>
<ul class="reflist rounded graybox">
<li><a class="refname" href="https://developer.mozilla.org/en/JavaScript">JavaScript Overview</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>JavaScript is a small, lightweight, object-oriented, cross-platform scripting language.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference">Gecko JavaScript Language Reference</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>Mozilla Developer Center's JavaScript documentation, including functions, statements, properties, and more.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/JavaScript_style_guide">JavaScript Style Guide</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>Mozilla's JavaScript coding standards.</p>
</li>
</ul>
<h3 id="ref-css">CSS: Adding Visual Effects</h3>
<ul class="reflist rounded graybox">
<li><a class="refname" href="https://developer.mozilla.org/en/CSS">CSS Overview</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>Cascading Style Sheets (CSS) is a stylesheet language used to describe the presentation of a document written in HTML or XML and is used to style a XUL-based application's user interface.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/CSS_Reference">Gecko CSS Reference</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>Mozilla Developer Center's CSS documentation, listing all available properties, values, and selectors.</p>
</li>
<li><a class="refname" href="http://www.w3.org/Style/CSS/">W3C CSS Homepage</a>
<span>via <a class="refsource" href="http://www.w3.org">World Wide Web Consortium</a></span>
<p>Find CSS news, specifications, and tools at the W3C's CSS homepage.</p>
</li>
</ul>
<h3 id="ref-fuel">FUEL: Easier Extension Development</h3>
<ul class="reflist rounded graybox">
<li><a class="refname" href="https://developer.mozilla.org/en/FUEL">FUEL API</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>FUEL is a JavaScript library designed to help developers build extensions using terminology and interfaces that are familiar to them.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/Thunderbird/STEEL">STEEL API</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>STEEL is the Scriptable Thunderbird Easy Extension Library. It is a FUEL-like set of interfaces to facilitate Thunderbird extension development.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/SeaMonkey/SMILE">SMILE API</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>SMILE is a FUEL-like set of interfaces to facilitate SeaMonkey extension development.</p>
</li>
</ul>
<h3 id="ref-xpcom">XPCOM: Cross-Platform Components</h3>
<ul class="reflist rounded graybox">
<li><a class="refname" href="https://developer.mozilla.org/en/XPCOM">XPCOM Overview</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>XPCOM is a cross-platform component object model with multiple language bindings, letting the XPCOM components be used and implemented in JavaScript, Java, and Python in addition to C++.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/XPCOM_API_Reference">XPCOM Reference</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>Mozilla Developer Center's XPCOM API documentation, listing frozen interfaces and functions.</p>
</li>
</ul>
<h3 id="ref-dom">DOM: Interacting with Content</h3>
<ul class="reflist rounded graybox">
<li><a class="refname" href="https://developer.mozilla.org/en/DOM">DOM Overview</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>The Document Object Model (DOM) is an API for HTML and XML documents. It provides a structural representation of the document, enabling you to modify its content and visual presentation.</p>
</li>
<li><a class="refname" href="https://developer.mozilla.org/en/Gecko_DOM_Reference">Gecko DOM Reference</a>
<span>via <a class="refsource" href="http://developer.mozilla.org">Mozilla Developer Center</a></span>
<p>Mozilla Developer Center's DOM API documentation</p>
</li>
</ul>
</div>
<div class="secondary" role="complementary">
<div class="highlight">
<h3>Jump to Reference</h3>
<ul class="xoxo">
<li><a href="#ref-xul">XUL</a></li>
<li><a href="#ref-js">JavaScript</a></li>
<li><a href="#ref-css">CSS</a></li>
<li><a href="#ref-fuel">FUEL</a></li>
<li><a href="#ref-xpcom">XPCOM</a></li>
<li><a href="#ref-dom">DOM</a></li>
</ul>
</div>
<div class="highlight">
<h3>More Resources</h3>
<ul class="xoxo">
<li>Already know what you're looking for? <a href="/en-US/developers/search">Search for it!</a></li>
<li>Learn how to use these APIs and more in our <a href="/en-US/developers/docs/how-to">How-to Library</a></li>
<li>Need help? <a href="https://forums.addons.mozilla.org">Visit our forums</a></li>
</ul>
</div>
</div>
{% endtrans %}
{% endblock %}

Просмотреть файл

@ -3211,6 +3211,31 @@ class TestNewsletter(test_utils.TestCase):
assert(urlencode({'EMAIL_ADDRESS_': email}) in v.call_args[1]['data']) assert(urlencode({'EMAIL_ADDRESS_': email}) in v.call_args[1]['data'])
class TestDocs(test_utils.TestCase):
def test_doc_urls(self):
eq_('/en-US/developers/docs/', reverse('devhub.docs', args=[]))
eq_('/en-US/developers/docs/te', reverse('devhub.docs', args=['te']))
eq_('/en-US/developers/docs/te/st', reverse('devhub.docs',
args=['te', 'st']))
urls = [(reverse('devhub.docs', args=["getting-started"]), 200),
(reverse('devhub.docs', args=["how-to"]), 200),
(reverse('devhub.docs', args=["how-to", "other-addons"]), 200),
(reverse('devhub.docs', args=["fake-page"]), 302),
(reverse('devhub.docs', args=["how-to", "fake-page"]), 200),
(reverse('devhub.docs'), 302)]
index = reverse('devhub.index')
for url in urls:
r = self.client.get(url[0])
eq_(r.status_code, url[1])
if url[1] == 302: # Redirect to the index page
self.assertRedirects(r, index)
class TestRemoveLocale(test_utils.TestCase): class TestRemoveLocale(test_utils.TestCase):
fixtures = ['base/apps', 'base/users', 'base/addon_3615'] fixtures = ['base/apps', 'base/users', 'base/addon_3615']

Просмотреть файл

@ -136,4 +136,10 @@ urlpatterns = decorate(write, patterns('',
# Newsletter archive & signup # Newsletter archive & signup
url('community/newsletter', views.newsletter, url('community/newsletter', views.newsletter,
name='devhub.community.newsletter'), name='devhub.community.newsletter'),
# Developer docs
url('docs/(?P<doc_name>[-_\w]+)?$',
views.docs, name='devhub.docs'),
url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
views.docs, name='devhub.docs'),
)) ))

Просмотреть файл

@ -1173,6 +1173,28 @@ def admin(request, addon):
{'addon': addon, 'admin_form': form}) {'addon': addon, 'admin_form': form})
def docs(request, doc_name=None, doc_page=None):
filename = ''
all_docs = {'getting-started': [], 'reference': [],
'policies': ['submission', 'reviews', 'maintenance',
'recommended', 'agreement', 'contact'],
'case-studies': ['cooliris', 'stumbleupon',
'download-statusbar'],
'how-to': ['getting-started', 'extension-development',
'thunderbird-mobile', 'theme-development',
'other-addons']}
if doc_name and doc_name in all_docs:
filename = '%s.html' % doc_name
if doc_page and doc_page in all_docs[doc_name]:
filename = '%s-%s.html' % (doc_name, doc_page)
if not filename:
return redirect('devhub.index')
return jingo.render(request, 'devhub/docs/%s' % filename)
# Newsletter details & signup # Newsletter details & signup
@anonymous_csrf @anonymous_csrf
def newsletter(request): def newsletter(request):

Просмотреть файл

@ -1932,36 +1932,6 @@ div.section-teaser .column .button {
margin-left: 0.7%; margin-left: 0.7%;
} }
/* @group Steps */
ol.numbered {
margin-left: 0;
list-style-type: none;
}
ol.numbered li {
position: relative;
margin-bottom: 1em;
overflow: hidden;
min-height:35px;
padding-left: 50px;
}
h4.step {
position: absolute;
left: 0;
top: 0;
background-image: url(../../img/icons/step.png);
background-repeat: no-repeat;
background-position: left top;
color: #FFFFFF;
font-size:1.6em;
font-weight:lighter;
padding:5px 13px 15px;
}
/* @end */
/* @group Pagination */ /* @group Pagination */
ol.pagination { ol.pagination {

208
media/css/zamboni/docs.less Normal file
Просмотреть файл

@ -0,0 +1,208 @@
.big-link {
text-align: center;
a {
padding: 0.5em 1em;
margin: 0 1em;
background-color: #C8E8F3;
border-radius: 6px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
text-decoration: none;
font-weight: bold;
&:hover {
background-color: #9FD0E0;
}
&.submit {
background-color: #7DBC39;
color: #fff;
&:hover {
background-color: #67A427;
}
}
&.positive {
color: #fff;
background-color: #6AB524;
&:hover {
background-color: #56A805;
}
}
}
}
ol.numbered {
margin-left: 0;
list-style-type: none;
h3 {
margin-top: 7px;
}
h4.step {
background-color: #223355;
-moz-border-radius: 50px;
-webkit-border-radius: 50px;
border-radius: 50px;
color: #FFFFFF;
font-size: 1.6em;
font-weight: lighter;
height: 28px;
left: 0;
padding: 5px;
position: absolute;
text-align: center;
top: 0;
width: 28px;
}
li {
position: relative;
margin-bottom: 1em;
overflow: hidden;
min-height:35px;
padding-left: 50px;
}
}
#getting-started .right-image {
padding: 1em;
}
.html-ltr #getting-started .right-image {
float: right;
}
.html-rtl #getting-started .right-image {
float: left;
}
.dev-docs {
.primary ul {
list-style: disc outside none;
margin-left: 2em;
}
ul.reflist, ul.blocks {
list-style: none;
margin-left: 0;
}
}
.casestudies .blocks .item {
.logo {
float: left;
text-align: right;
width: 30%;
}
.info {
margin-left: 35%;
}
}
#casestudy {
.info {
float: left;
width: 22%;
.dotted {
border-bottom: 2px dotted #C9E8F3;
margin: 0 0 0.5em;
padding: 0 0 0.5em;
}
}
.secondary {
width: 22%;
}
.hubtext {
margin: 0 25%;
}
.item {
width: auto;
min-width: 0;
padding: 1em;
}
.pull {
max-width: 22%;
position: absolute;
right: 0;
p.caption {
color: #868686;
font-family: georgia,serif;
font-style: italic;
margin: 0;
padding: 0;
}
img {
margin: 0 auto;
}
}
img.pull {
margin-top: 0;
max-width: 22%;
}
blockquote {
margin: 1em;
padding-left: 0.2em;
&:before {
color: #B5D9E5;
content: "“";
display: block;
float: left;
font-family: georgia,serif;
font-size: 400%;
height: 0;
line-height: 0;
margin-left: -0.5em;
margin-top: 0.3em;
width: 0;
}
p {
color: #868686;
font-family: georgia,sans-serif;
margin-bottom: 0.5em;
}
&.pull {
max-width: 19%;
&:before {
font-size: 500%;
}
p {
font-size: 130%;
line-height: 140%;
}
}
&.long {
font-style: normal;
p {
margin: 0.5em 0;
}
}
}
}
.html-rtl #casestudy {
.pull {
left: 0;
right: auto;
}
blockquote {
padding-left: 0;
padding-right: 0.2em;
&:before {
display: none;
}
}
}

Просмотреть файл

@ -409,6 +409,7 @@ MINIFY_BUNDLES = {
), ),
'zamboni/devhub': ( 'zamboni/devhub': (
'css/zamboni/developers.css', 'css/zamboni/developers.css',
'css/zamboni/docs.less',
), ),
'zamboni/editors': ( 'zamboni/editors': (
'css/zamboni/editors.css', 'css/zamboni/editors.css',