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> |