OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * Takes the |pluginsData| input argument which represents data about the | 6 * Takes the |pluginsData| input argument which represents data about the |
7 * currently installed/running plugins and populates the html jstemplate with | 7 * currently installed/running plugins and populates the html jstemplate with |
8 * that data. It expects an object structure like the above. | 8 * that data. It expects an object structure like the above. |
9 * @param {Object} pluginsData Detailed info about installed plugins. Same | 9 * @param {Object} pluginsData Detailed info about installed plugins. Same |
10 * expected format as returnPluginsData(). | 10 * expected format as returnPluginsData(). |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 * correctly populate the page: | 44 * correctly populate the page: |
45 * { | 45 * { |
46 * plugins: [ | 46 * plugins: [ |
47 * { | 47 * { |
48 * name: 'Group Name', | 48 * name: 'Group Name', |
49 * description: 'description', | 49 * description: 'description', |
50 * version: 'version', | 50 * version: 'version', |
51 * update_url: 'http://update/', | 51 * update_url: 'http://update/', |
52 * critical: true, | 52 * critical: true, |
53 * enabled: true, | 53 * enabled: true, |
| 54 * identifier: 'plugin-name', |
54 * plugin_files: [ | 55 * plugin_files: [ |
55 * { | 56 * { |
56 * path: '/blahblah/blahblah/MyCrappyPlugin.plugin', | 57 * path: '/blahblah/blahblah/MyCrappyPlugin.plugin', |
57 * name: 'MyCrappyPlugin', | 58 * name: 'MyCrappyPlugin', |
58 * version: '1.2.3', | 59 * version: '1.2.3', |
59 * description: 'My crappy plugin', | 60 * description: 'My crappy plugin', |
60 * mimeTypes: [ | 61 * mimeTypes: [ |
61 * { description: 'Foo Media', | 62 * { description: 'Foo Media', |
62 * fileExtensions: ['foo'], | 63 * fileExtensions: ['foo'], |
63 * mimeType: 'application/x-my-foo' }, | 64 * mimeType: 'application/x-my-foo' }, |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // (yet), so in the meanwhile just update regularly. | 264 // (yet), so in the meanwhile just update regularly. |
264 setInterval(requestPluginsData, 30000); | 265 setInterval(requestPluginsData, 30000); |
265 | 266 |
266 // Get data and have it displayed upon loading. | 267 // Get data and have it displayed upon loading. |
267 document.addEventListener('DOMContentLoaded', requestPluginsData); | 268 document.addEventListener('DOMContentLoaded', requestPluginsData); |
268 | 269 |
269 // Add handlers to static HTML elements. | 270 // Add handlers to static HTML elements. |
270 $('collapse').onclick = toggleTmiMode; | 271 $('collapse').onclick = toggleTmiMode; |
271 $('expand').onclick = toggleTmiMode; | 272 $('expand').onclick = toggleTmiMode; |
272 $('details-link').onclick = toggleTmiMode; | 273 $('details-link').onclick = toggleTmiMode; |
OLD | NEW |