Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(835)

Unified Diff: chrome/common/extensions/docs/examples/extensions/email_this_page/options.html

Issue 9146038: Converting the email_this_page sample extension to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Zipped. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/extensions/email_this_page/options.html
diff --git a/chrome/common/extensions/docs/examples/extensions/email_this_page/options.html b/chrome/common/extensions/docs/examples/extensions/email_this_page/options.html
index 405afdf3d96d29e8eb811c54c0aa137a29ddf810..f19f1ceb1fe150d42aad4b5e910f3fe8d9ecbdc2 100644
--- a/chrome/common/extensions/docs/examples/extensions/email_this_page/options.html
+++ b/chrome/common/extensions/docs/examples/extensions/email_this_page/options.html
@@ -1,6 +1,6 @@
<!DOCTYPE>
<!--
- * Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
+ * Copyright (c) 2012 The Chromium Authors. All rights reserved. Use of this
* source code is governed by a BSD-style license that can be found in the
* LICENSE file.
-->
@@ -13,39 +13,9 @@
font-size: 10pt;
}
</style>
-<script>
- var gmail = "https://mail.google.com/mail/?extsrc=mailto&url=%s";
-
-function toggle(radioButton) {
- if (window.localStorage == null) {
- alert('Local storage is required for changing providers');
- return;
- }
-
- var selected = radioButton.value;
- if (selected == "gmail") {
- window.localStorage.customMailtoUrl = gmail;
- } else {
- window.localStorage.customMailtoUrl = "";
- }
-}
-
-function main() {
- if (window.localStorage == null) {
- alert("LocalStorage must be enabled for changing options.");
- document.getElementById('default').disabled = true;
- document.getElementById('gmail').disabled = true;
- return;
- }
-
- // Default handler is checked. If we've chosen another provider, we must
- // change the checkmark.
- if (window.localStorage.customMailtoUrl == gmail)
- document.getElementById('gmail').checked = true;
-}
-</script>
+<script src="options.js"></script>
</head>
-<body onload="main()">
+<body>
<table border="0">
<tr>
<td rowspan="2" valign="top" align="center" width="80">
@@ -58,10 +28,14 @@ function main() {
<div id="providerSelection">
<strong>Select provider to use when emailing a web page address:</strong>
<br /><br />
- <input id="default" type="radio" name="mailto" value="mailto"
- onclick="toggle(this)" checked>Your default mail handler<br>
- <input id="gmail" type="radio" name="mailto" value="gmail"
- onclick="toggle(this)">Gmail<br>
+ <label>
+ <input id="default" type="radio" name="mailto" value="mailto" checked>
+ Your default mail handler<br>
+ </label>
+
+ <label>
+ <input id="gmail" type="radio" name="mailto" value="gmail">Gmail<br>
+ </label>
</div>
</td>
</tr>

Powered by Google App Engine
This is Rietveld 408576698