Commit 8a9227c8 authored by kalman's avatar kalman Committed by Commit bot

Replace the sample Calendar extension with a deprecation notice linking to a

working (also By Google) Calendar extension.

BUG=435290
R=aboxhall@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/890173003

Cr-Commit-Position: refs/heads/master@{#314075}
parent f5231cd4
...@@ -4,62 +4,14 @@ ...@@ -4,62 +4,14 @@
* LICENSE file. * LICENSE file.
*/ */
//Contains true if multiple calendar option is checked, false otherwise. var $ = document.getElementById.bind(document);
var isMultiCalendar;
//adding listener when body is loaded to call init function. var url = 'https://chrome.google.com/webstore/detail/' +
window.addEventListener('load', init, false); 'google-calendar-by-google/gmbgaklkmjakoegficnlkhebmhkjfich';
/** $('name').textContent = chrome.i18n.getMessage('name');
* Sets the value of multiple calendar checkbox based on value from $('link').href = url;
* local storage. $('remove').onclick = function() {
*/ chrome.management.uninstallSelf({showConfirmDialog: true});
function init() { window.close();
isMultiCalendar = JSON.parse(localStorage.multiCalendar || false);
$('multiCalendar').checked = isMultiCalendar;
$('multiCalendarText').innerHTML =
chrome.i18n.getMessage('multiCalendarText');
$('multiCalendar').addEventListener('click', save);
$('optionsTitle').innerHTML = chrome.i18n.getMessage('optionsTitle');
$('imageTooltip').title = chrome.i18n.getMessage('imageTooltip');
$('imageTooltip').alt = chrome.i18n.getMessage('imageTooltip');
$('multiCalendarText').title = chrome.i18n.getMessage('multiCalendarToolTip');
$('multiCalendar').title = chrome.i18n.getMessage('multiCalendarToolTip');
$('extensionName').innerHTML = chrome.i18n.getMessage('extensionName');
if (chrome.i18n.getMessage('direction') == 'rtl') {
$('body').style.direction = 'rtl';
}
};
/**
* Saves the value of the checkbox into local storage.
*/
function save() {
var multiCalendarId = $('multiCalendar');
localStorage.multiCalendar = multiCalendarId.checked;
if (multiCalendarId) {
multiCalendar.disabled = true;
}
$('status').innerHTML = chrome.i18n.getMessage('status_saving');
$('status').style.display = 'block';
// Sends message to the background page notifying it that the settings
// have updated.
chrome.runtime.getBackgroundPage(function(bg) {
bg.onSettingsChange();
statusSaved();
});
};
function statusSaved() {
if ($('multiCalendar')) {
if ($('multiCalendar').disabled) {
$('status').innerHTML = chrome.i18n.getMessage('status_saved');
$('status').style.display = 'block';
setTimeout(
function() { $('status').style.display = 'none'; }
, 1500);
}
$('multiCalendar').disabled = false;
}
}; };
/**
* Copyright (c) 2010 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.
*/
/**
* Alias for document.getElementById.
* @param {string} id The id of the element.
* @return {HTMLElement} The html element for the given element id.
*/
function $(id) {
return document.getElementById(id);
};
...@@ -4,19 +4,28 @@ ...@@ -4,19 +4,28 @@
"manifest_version": 2, "manifest_version": 2,
"default_locale":"en", "default_locale":"en",
"options_page": "views/options.html", "options_page": "views/options.html",
"version": "1.5.0", "options_ui": {
"page": "views/options.html",
"chrome_style": true
},
"version": "2.0.0",
"background": { "background": {
"page": "views/background.html", "scripts": ["javascript/background.js"],
"persistent": false "persistent": false
}, },
"permissions": [ "permissions": [
"alarms", "tabs", "webNavigation", "http://*.google.com/", "https://*.google.com/" "notifications"
], ],
"browser_action": { "browser_action": {
"default_icon": {
"19": "images/icon-19.png",
"38": "images/icon-38.png"
},
"default_title": "__MSG_title__" "default_title": "__MSG_title__"
}, },
"icons": { "icons": {
"128": "images/icon-128.gif", "128": "images/icon-128.png",
"16":"images/icon-16.gif" "48": "images/icon-48.png",
"16":"images/icon-16.png"
} }
} }
<!DOCTYPE html>
<!--
* Copyright (c) 2010 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.
-->
<html>
<head>
</head>
<body>
<img id="logged_in" src="../images/icon-16.gif">
<canvas id="canvas" width="19" height="19"></canvas>
<script src="../javascript/util.js"></script>
<script src="../javascript/background.js"></script>
</body>
</html>
...@@ -5,83 +5,23 @@ ...@@ -5,83 +5,23 @@
* LICENSE file. * LICENSE file.
--> -->
<html> <html>
<head>
<title id=optionsTitle></title>
<script src="../javascript/options.js"></script>
<script src="../javascript/util.js"></script>
<style>
#content {
background-color: white;
border: 4px solid #B5C7DE;
border-radius: 12px;
margin: 40px auto 20px;
padding: 8px;
width: 600px;
}
.option_row {
clear: left;
padding: 2.5em 1em 0;
text-align:center
}
#status {
background-color: rgb(255, 241, 168);
display: none;
margin-left: 3px;
padding: 1px 2px;
text-align: center;
font-size: 15px;
color: #000;
}
#multiCalendarText {
font-size: 15px;
color: #000;
}
body {
background-color: "#ebeff9";
}
#logo {
font-size: 20px;
text-align: center;
}
#extensionName {
color: #444;
}
</style>
</head>
<body> <body>
<div id="content">
<div id = "logo">
<img src="../images/icon-128.gif" width="48">&nbsp;&nbsp;&nbsp;
<img src="../images/calendar_logo.gif" id="imageTooltip" title="" alt="">
<br>
<label id="extensionName" ></label>
</div>
<div class="option_row"> <p>
<div> <strong><span id="name"></span> is now obsolete and must be removed, as it
<table cellpadding=1 width=100%> relies on an API which will be turned off imminently</strong>.
<tr> <a href="https://developers.google.com/google-apps/calendar/v2/developers_guide_protocol">Learn more</a>.
<td width="15%"> </p>
&nbsp;
</td> <p>
<td width="5%"> Instead, we recommend the more powerful <a id="link">Google Calendar (by
<input type="checkbox" id="multiCalendar" name="multiCalendar" title=""> Google)</a> Extension.
</td> </p>
<td width="40%" align="left">
<span id="multiCalendarText" title=""></span> <p>
</td> <button id="remove">Remove from Chrome...</button>
<td width="30%"> </p>
<label id="status"></label>
</td> <script src="../javascript/options.js"></script>
<td width="10%">
&nbsp;
</td>
</tr>
</table>
<br>
</div>
</div>
</div>
</body> </body>
</html> </html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment