Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show formatted dates as comments. #47

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
MIT License

Original work Copyright (c) 2009 Benjamin Hollis
Modified work Copyright (c) 2012 Gildas Lormeau
Modified work Copyright (c) 2012 Gildas Lormeau
Modified work Copyright (c) 2015 Bill Kuker

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
28 changes: 8 additions & 20 deletions WebContent/background.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
var path, value, copyPathMenuEntryId, copyValueMenuEntryId;

function getDefaultTheme(callback) {
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4)
callback(xhr.responseText);
};
xhr.open("GET", "jsonview.css", true);
xhr.send(null);
}

function copy(value) {
var selElement, selRange, selection;
selElement = document.createElement("span");
Expand Down Expand Up @@ -73,8 +63,7 @@ function init() {
if (message.html)
port.postMessage({
onjsonToHTML : true,
html : message.html,
theme : localStorage.theme
html : message.html
});
if (message.error) {
workerJSONLint = new Worker("workerJSONLint.js");
Expand All @@ -97,7 +86,8 @@ function init() {
workerFormatter.addEventListener("message", onWorkerFormatterMessage, false);
workerFormatter.postMessage({
json : json,
fnName : msg.fnName
fnName : msg.fnName,
options : localStorage.options ? JSON.parse(localStorage.options) : {}
});
}
});
Expand All @@ -110,13 +100,11 @@ if (localStorage.options)
options = JSON.parse(localStorage.options);
if (typeof options.addContextMenu == "undefined") {
options.addContextMenu = true;
options.formatDates = true;
options.formatMultilineStrings = true;

localStorage.options = JSON.stringify(options);
}

if (!localStorage.theme)
getDefaultTheme(function(theme) {
localStorage.theme = theme;
init();
});
else
init();

init();
19 changes: 0 additions & 19 deletions WebContent/codemirror/LICENSE

This file was deleted.

174 changes: 0 additions & 174 deletions WebContent/codemirror/codemirror.css

This file was deleted.

Loading