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

Side by Side Diff: go-back-with-backspace/pages/common.js

Issue 2325963003: Add options and a browser-action popup. (Closed) Base URL: https://chromium.googlesource.com/chromium/extensions-by-google.git@master
Patch Set: Response to comments Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « go-back-with-backspace/manifest.json ('k') | go-back-with-backspace/pages/installed.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 Google Inc. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Load strings from messages.json into the HTML page. Each element that needs
6 // an internationalized string should have an 'i18n' property holding the
7 // name of the message to be used.
8 function LoadInternationalizedStrings() {
9 var all = document.querySelectorAll('[i18n]');
10 for (var i = 0; i < all.length; ++i) {
11 var i18n = all[i].getAttribute('i18n');
12 if (i18n)
13 all[i].textContent = chrome.i18n.getMessage(i18n);
14 }
15 }
16
17 // Open a pre-filled email to send feedback to the extension developers. The
18 // initial content of the email depends on whether the URL of the current page
19 // is provided.
20 function reportPage(url) {
21 var subject = chrome.i18n.getMessage('reportSubject');
22 var body = '';
23 if (url)
24 body = chrome.i18n.getMessage('reportBodyWithURL', url);
25 else
26 body = chrome.i18n.getMessage('reportBody');
27 var msg = 'mailto:gobackwithbackspace@google.com' +
28 '?subject=' + encodeURIComponent(subject) +
29 '&body=' + encodeURIComponent(body);
30 chrome.tabs.create({
31 url: msg,
32 active: true});
33 }
OLDNEW
« no previous file with comments | « go-back-with-backspace/manifest.json ('k') | go-back-with-backspace/pages/installed.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698