OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <title i18n-content="title">About extensions</title> | 5 <title i18n-content="title">About extensions</title> |
6 <style> | 6 <style> |
7 body { | 7 body { |
8 font-size: 84%; | 8 font-size: 84%; |
9 font-family: Arial, Helvetica, sans-serif; | 9 font-family: Arial, Helvetica, sans-serif; |
10 padding: 0.75em; | 10 padding: 0.75em; |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 * expects to correctly populate the page. | 199 * expects to correctly populate the page. |
200 */ | 200 */ |
201 var extensionDataFormat = { | 201 var extensionDataFormat = { |
202 "extensions": [ | 202 "extensions": [ |
203 { | 203 { |
204 "id": "0000000000000000000000000000000000000000", | 204 "id": "0000000000000000000000000000000000000000", |
205 "name": "Google Chrome", | 205 "name": "Google Chrome", |
206 "description": "Extension long format description", | 206 "description": "Extension long format description", |
207 "version": "1.0.231", | 207 "version": "1.0.231", |
208 "enabled": "true", | 208 "enabled": "true", |
| 209 "options_url": "options.html", |
209 "content_scripts": [ | 210 "content_scripts": [ |
210 { | 211 { |
211 "js": ["script1_file1.js", "script1_file2.js"], | 212 "js": ["script1_file1.js", "script1_file2.js"], |
212 "css": ["script1_file1.css", "script1_file2.css"], | 213 "css": ["script1_file1.css", "script1_file2.css"], |
213 "matches": ["http://*/*", "http://other.com/*"] | 214 "matches": ["http://*/*", "http://other.com/*"] |
214 }, | 215 }, |
215 { | 216 { |
216 "js": ["script2_file1.js", "script2_file2.js"], | 217 "js": ["script2_file1.js", "script2_file2.js"], |
217 "css": ["script2_file1.css", "script2_file2.css"], | 218 "css": ["script2_file1.css", "script2_file2.css"], |
218 "matches": ["http://*/*", "http://other.com/*"] | 219 "matches": ["http://*/*", "http://other.com/*"] |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 339 |
339 /** | 340 /** |
340 * Handles an 'uninstall' button getting clicked. | 341 * Handles an 'uninstall' button getting clicked. |
341 */ | 342 */ |
342 function handleUninstallExtension(node) { | 343 function handleUninstallExtension(node) { |
343 // Tell the C++ ExtensionDOMHandler to uninstall an extension. | 344 // Tell the C++ ExtensionDOMHandler to uninstall an extension. |
344 chrome.send('uninstall', [node.extensionId]); | 345 chrome.send('uninstall', [node.extensionId]); |
345 } | 346 } |
346 | 347 |
347 /** | 348 /** |
348 * Utility function which asks the C++ to show a platform-specific file select | 349 * Handles an 'options' button getting clicked. |
349 * dialog, and fire |callback| with the |filePath| that resulted. |selectType| | |
350 * can be either 'file' or 'folder'. |operation| can be 'load', 'packRoot', | |
351 * or 'pem' which are signals to the C++ to do some operation-specific | |
352 * configuration. | |
353 */ | 350 */ |
| 351 function handleOptions(node) { |
| 352 chrome.send('options', [node.extensionId]); |
| 353 } |
| 354 |
| 355 /** |
| 356 * Utility function which asks the C++ to show a platform-specific file select |
| 357 * dialog, and fire |callback| with the |filePath| that resulted. |selectType| |
| 358 * can be either 'file' or 'folder'. |operation| can be 'load', 'packRoot', |
| 359 * or 'pem' which are signals to the C++ to do some operation-specific |
| 360 * configuration. |
| 361 */ |
354 function showFileDialog(selectType, operation, callback) { | 362 function showFileDialog(selectType, operation, callback) { |
355 handleFilePathSelected = function(filePath) { | 363 handleFilePathSelected = function(filePath) { |
356 callback(filePath); | 364 callback(filePath); |
357 handleFilePathSelected = function() {}; | 365 handleFilePathSelected = function() {}; |
358 }; | 366 }; |
359 | 367 |
360 chrome.send('selectFilePath', [selectType, operation]); | 368 chrome.send('selectFilePath', [selectType, operation]); |
361 } | 369 } |
362 | 370 |
363 /** | 371 /** |
(...skipping 16 matching lines...) Expand all Loading... |
380 | 388 |
381 /** | 389 /** |
382 * Shows to modal HTML pack dialog. | 390 * Shows to modal HTML pack dialog. |
383 */ | 391 */ |
384 function showPackDialog() { | 392 function showPackDialog() { |
385 document.getElementById('dialogBackground').style.display="-webkit-box"; | 393 document.getElementById('dialogBackground').style.display="-webkit-box"; |
386 } | 394 } |
387 | 395 |
388 /** | 396 /** |
389 * Hides the pack dialog. | 397 * Hides the pack dialog. |
390 */ | 398 */ |
391 function hidePackDialog() { | 399 function hidePackDialog() { |
392 document.getElementById('dialogBackground').style.display="none" | 400 document.getElementById('dialogBackground').style.display="none" |
393 } | 401 } |
394 | 402 |
395 /** | 403 /** |
396 * Pop up a select dialog to capture the extension path. | 404 * Pop up a select dialog to capture the extension path. |
397 */ | 405 */ |
398 function selectExtensionPath() { | 406 function selectExtensionPath() { |
399 showFileDialog('folder', 'packRoot', function(filePath) { | 407 showFileDialog('folder', 'packRoot', function(filePath) { |
400 document.getElementById('extensionPathText').value = filePath; | 408 document.getElementById('extensionPathText').value = filePath; |
(...skipping 30 matching lines...) Expand all Loading... |
431 HEADING | 439 HEADING |
432 </div> | 440 </div> |
433 <div class="dialogBrowseRow"> | 441 <div class="dialogBrowseRow"> |
434 <div i18n-content="rootDirectoryLabel"> | 442 <div i18n-content="rootDirectoryLabel"> |
435 ROOT_DIR | 443 ROOT_DIR |
436 </div> | 444 </div> |
437 <div> | 445 <div> |
438 <input type="text" id="extensionPathText"> | 446 <input type="text" id="extensionPathText"> |
439 </div> | 447 </div> |
440 <div> | 448 <div> |
441 <input type="button" value="BROWSE" | 449 <input type="button" value="BROWSE" |
442 i18n-values="value:packDialogBrowse" | 450 i18n-values="value:packDialogBrowse" |
443 onclick="selectExtensionPath();"> | 451 onclick="selectExtensionPath();"> |
444 </div> | 452 </div> |
445 </div> | 453 </div> |
446 <div class="dialogBrowseRow"> | 454 <div class="dialogBrowseRow"> |
447 <div i18n-content="privateKeyLabel"> | 455 <div i18n-content="privateKeyLabel"> |
448 PRIVATE_KEY | 456 PRIVATE_KEY |
449 </div> | 457 </div> |
450 <div> | 458 <div> |
451 <input type="text" id="privateKeyPath"> | 459 <input type="text" id="privateKeyPath"> |
452 </div> | 460 </div> |
453 <div> | 461 <div> |
454 <input type="button" value="BROWSE" | 462 <input type="button" value="BROWSE" |
455 i18n-values="value:packDialogBrowse" | 463 i18n-values="value:packDialogBrowse" |
456 onclick="selectPrivateKeyPath();"> | 464 onclick="selectPrivateKeyPath();"> |
457 </div> | 465 </div> |
458 </div> | 466 </div> |
459 <div class="dialogBrowseRow" id="dialogContentFooter"> | 467 <div class="dialogBrowseRow" id="dialogContentFooter"> |
460 <div> | 468 <div> |
461 <input type="button" value="OK" onclick="packExtension();"> | 469 <input type="button" value="OK" onclick="packExtension();"> |
462 </div> | 470 </div> |
463 <div> | 471 <div> |
464 <input type="button" value="Cancel" onclick="hidePackDialog();"> | 472 <input type="button" value="Cancel" onclick="hidePackDialog();"> |
465 </div> | 473 </div> |
466 </div> | 474 </div> |
467 </div> | 475 </div> |
468 </div> | 476 </div> |
469 </div> | 477 </div> |
470 </div> | 478 </div> |
471 | 479 |
472 <div id="body-container" style="display:none;"> | 480 <div id="body-container" style="display:none;"> |
473 | 481 |
474 <div id="header"><h1>About extensions</h1></div> | 482 <div id="header"><h1>About extensions</h1></div> |
475 | 483 |
476 <div id="outside"> | 484 <div id="outside"> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 >Enable</button> | 525 >Enable</button> |
518 <button | 526 <button |
519 jsvalues=".extensionId:id" | 527 jsvalues=".extensionId:id" |
520 jsdisplay="enabled" | 528 jsdisplay="enabled" |
521 onclick="handleReloadExtension(this)" | 529 onclick="handleReloadExtension(this)" |
522 >Reload</button> | 530 >Reload</button> |
523 <button | 531 <button |
524 jsvalues=".extensionId:id" | 532 jsvalues=".extensionId:id" |
525 onclick="handleUninstallExtension(this)" | 533 onclick="handleUninstallExtension(this)" |
526 >Uninstall</button> | 534 >Uninstall</button> |
| 535 <button |
| 536 jsdisplay="options_url" |
| 537 jsvalues=".extensionId:id" |
| 538 onclick="handleOptions(this)" |
| 539 >Options</button> |
527 </div> | 540 </div> |
528 </div> | 541 </div> |
529 </div> | 542 </div> |
530 </div> | 543 </div> |
531 </div> | 544 </div> |
532 </div> | 545 </div> |
533 | 546 |
534 </td> | 547 </td> |
535 <td style="min-width:20px"></td> | 548 <td style="min-width:20px"></td> |
536 <td valign="top"> | 549 <td valign="top"> |
537 <h2>Tools</h2> | 550 <h2>Tools</h2> |
538 | 551 |
539 <div class="sidebar-content"> | 552 <div class="sidebar-content"> |
540 <button onclick="loadExtension()">Load unpacked extension...</butt
on><br /> | 553 <button onclick="loadExtension()">Load unpacked extension...</butt
on><br /> |
541 <button onclick="showPackDialog()">Pack extension...</button><br /
> | 554 <button onclick="showPackDialog()">Pack extension...</button><br /
> |
542 <button onclick="autoUpdate()">Update extensions now</button> | 555 <button onclick="autoUpdate()">Update extensions now</button> |
543 </div> | 556 </div> |
544 </td> | 557 </td> |
545 </tr> | 558 </tr> |
546 </table> | 559 </table> |
547 | 560 |
548 </div> <!-- /outside --> | 561 </div> <!-- /outside --> |
549 </body> | 562 </body> |
550 </html> | 563 </html> |
OLD | NEW |