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

Unified Diff: chrome/common/extensions/docs/examples/extensions/news/views/background.html

Issue 3681008: Improvements to the Google News extension (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 2 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/news/views/background.html
===================================================================
--- chrome/common/extensions/docs/examples/extensions/news/views/background.html (revision 0)
+++ chrome/common/extensions/docs/examples/extensions/news/views/background.html (revision 0)
@@ -0,0 +1,27 @@
+<!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.
+-->
+
+<!--
+@fileoverview Contains script for running at the background to open up the
+options page when the extension is reloaded.
+-->
+
+<html>
+ <body>
+ <script>
+ //Retrieves value from local storage(if found).
+ var newsFlag = window.localStorage.getItem('newsFlag');
+
+ //Runs if extension installation is done.
+ if(!newsFlag) {
+ var optionsPageURL = chrome.extension.getURL('/views/options.html');
+ chrome.tabs.create({url: optionsPageURL});
+ window.localStorage.setItem('newsFlag','1');
+ }
+ </script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698