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

Unified Diff: chrome/browser/resources/snippets_internals.js

Issue 2757663002: ntp-snippets-internals: add fields, indent JSON (Closed)
Patch Set: Make llx work Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/snippets_internals_message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/snippets_internals.js
diff --git a/chrome/browser/resources/snippets_internals.js b/chrome/browser/resources/snippets_internals.js
index 7f623668eb0b2cd8daef77891220b21b78e9818e..6e8bbe94c783090b99d1e4769fb21b160c5d36c9 100644
--- a/chrome/browser/resources/snippets_internals.js
+++ b/chrome/browser/resources/snippets_internals.js
@@ -15,7 +15,7 @@ cr.define('chrome.SnippetsInternals', function() {
});
$('submit-dump').addEventListener('click', function(event) {
- downloadJson(JSON.stringify(lastSuggestions));
+ downloadJson(JSON.stringify(lastSuggestions, null, 2));
event.preventDefault();
});
@@ -125,7 +125,7 @@ cr.define('chrome.SnippetsInternals', function() {
// create a link with download attribute and simulate a click, instead.)
var link = document.createElement('a');
link.download = 'snippets.json';
- link.href = 'data:,' + json;
+ link.href = 'data:application/json,' + encodeURI(json);
link.click();
}
« no previous file with comments | « no previous file | chrome/browser/ui/webui/snippets_internals_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698