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

Unified Diff: chrome/browser/resources/script_bubble/popup.js

Issue 11308302: Delete the old extension-based script bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/script_bubble/popup.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/script_bubble/popup.js
===================================================================
--- chrome/browser/resources/script_bubble/popup.js (revision 170599)
+++ chrome/browser/resources/script_bubble/popup.js (working copy)
@@ -1,32 +0,0 @@
-// 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.
-
-init();
-
-function init() {
- var extensionIds = location.hash.substring(1).split(',');
- populateHeading(extensionIds.length);
-
- var template = document.querySelector('.row');
- extensionIds.forEach(populateRow.bind(null, template));
-}
-
-function populateHeading(numExtensions) {
- // TODO(aa): Internationalize. Copy whatever bookmark manager is doing.
- var singular = ' extension is interacting with this page';
- var plural = ' extensions are interacting with this page';
- var phrase = numExtensions == 1 ? singular : plural;
- document.querySelector('h1').textContent = numExtensions + phrase;
-}
-
-function populateRow(template, extensionId) {
- chrome.management.get(extensionId, function(info) {
- var row = template.cloneNode(true);
- row.querySelector('.icon').src =
- 'chrome://extension-icon/' + extensionId + '/16/1';
- row.querySelector('.name').textContent = info.name;
- row.classList.remove('template');
- template.parentNode.appendChild(row);
- });
-}
« no previous file with comments | « chrome/browser/resources/script_bubble/popup.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698