2014-09-06 16:27:18 +00:00
|
|
|
<!doctype html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<title>Diff to HTML by rtfpessoa</title>
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
Diff to HTML (template.html)
|
|
|
|
|
Author: rtfpessoa
|
|
|
|
|
Date: Friday 29 August 2014
|
2014-09-14 19:50:17 +00:00
|
|
|
Last Update: Sunday 14 September 2014
|
2014-09-06 16:27:18 +00:00
|
|
|
-->
|
|
|
|
|
|
2014-09-08 17:15:51 +00:00
|
|
|
<!--<link rel="stylesheet" type="text/css" href="diff2html.css">-->
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="diff2html.min.css">
|
2014-09-06 16:27:18 +00:00
|
|
|
|
2014-09-08 17:15:51 +00:00
|
|
|
<!--<script type="text/javascript" src="diff2html.js"></script>-->
|
|
|
|
|
<script type="text/javascript" src="diff2html.min.js"></script>
|
2014-09-06 16:27:18 +00:00
|
|
|
<script>
|
|
|
|
|
var exInput = 'diff --git a/src/app/language/en.json b/src/app/language/en.json\n' +
|
|
|
|
|
'index ccf92c9..68b8345 100644\n' +
|
|
|
|
|
'--- a/src/app/language/en.json\n' +
|
|
|
|
|
'+++ b/src/app/language/en.json\n' +
|
|
|
|
|
'@@ -270,5 +270,6 @@\n' +
|
|
|
|
|
' "Open Item Details": "Open Item Details",\n' +
|
|
|
|
|
' "Add Item to Favorites": "Add Item to Favorites",\n' +
|
|
|
|
|
' "Mark as Seen": "Mark as Seen",\n' +
|
|
|
|
|
' "Open Settings": "Open Settings"{+,+}\n' +
|
|
|
|
|
'{+ "Custom...": "Custom..."+}\n' +
|
|
|
|
|
'}\n' +
|
|
|
|
|
'diff --git a/src/app/language/fr.json b/src/app/language/fr.json\n' +
|
|
|
|
|
'index 9c773c5..8fb637a 100644\n' +
|
|
|
|
|
'--- a/src/app/language/fr.json\n' +
|
|
|
|
|
'+++ b/src/app/language/fr.json\n' +
|
|
|
|
|
'@@ -266,5 +266,6 @@\n' +
|
|
|
|
|
' "Add Item to Favorites": "Ajouter aux favoris",\n' +
|
|
|
|
|
' "Mark as Seen": "Marquer comme vu",\n' +
|
|
|
|
|
' "Open this screen": "Afficher cette page",\n' +
|
|
|
|
|
' "Open Settings": "Ouvrir les Réglages"{+,+}\n' +
|
|
|
|
|
'{+ "Custom...": "Ajouter un fichier..."+}\n' +
|
|
|
|
|
'}\n' +
|
|
|
|
|
'diff --git a/src/app/vendor/videojsplugins.js b/src/app/vendor/videojsplugins.js\n' +
|
|
|
|
|
'index 10856e3..892b7ca 100644\n' +
|
|
|
|
|
'--- a/src/app/vendor/videojsplugins.js\n' +
|
|
|
|
|
'+++ b/src/app/vendor/videojsplugins.js\n' +
|
|
|
|
|
'@@ -83,7 +83,7 @@ videojs.plugin(\'customSubtitles\', function() {\n' +
|
|
|
|
|
' options[\'track\'] = {\n' +
|
|
|
|
|
' kind: function() { return \'subtitles\'; },\n' +
|
|
|
|
|
' player: player,\n' +
|
|
|
|
|
' label: function(){ return [-\'-]{+i18n.__("+}Custom...[-\'-]{+")+} },\n' +
|
|
|
|
|
' dflt: function(){ return false; },\n' +
|
|
|
|
|
' mode: function(){ return false; }\n' +
|
|
|
|
|
' };\n' +
|
|
|
|
|
'@@ -107,7 +107,7 @@ videojs.plugin(\'customSubtitles\', function() {\n' +
|
|
|
|
|
'\n' +
|
|
|
|
|
' CustomTrackMenuItem.prototype.loadSubtitle = function(filePath) {\n' +
|
|
|
|
|
' // TODO Delete old track\n' +
|
|
|
|
|
' this.track = this.player_.addTextTrack(\'subtitles\', [-\'-]{+i18n.__("+}Custom...[-\'-]{+")+}, \'00\', { src: filePath });\n' +
|
|
|
|
|
' vjs.TextTrackMenuItem.prototype.onClick.call(this); // redirect to TextTrackMenuItem.onClick\n' +
|
|
|
|
|
' }\n';
|
|
|
|
|
|
|
|
|
|
document.onreadystatechange = function () {
|
2014-09-08 17:15:51 +00:00
|
|
|
var diffJson = Diff2Html.getJsonFromDiff(exInput);
|
|
|
|
|
var lineByLineDiffHtml = Diff2Html.getPrettyHtmlFromJson(diffJson);
|
|
|
|
|
document.getElementById('line-by-line').innerHTML = lineByLineDiffHtml;
|
2014-09-14 19:50:17 +00:00
|
|
|
var sideBySideDiffHtml = Diff2Html.getPrettySideBySideHtmlFromJson(diffJson);
|
|
|
|
|
document.getElementById('side-by-side').innerHTML = sideBySideDiffHtml;
|
2014-09-06 16:27:18 +00:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
</head>
|
2014-09-08 17:15:51 +00:00
|
|
|
<body style="text-align: center; font-family: 'Source Sans Pro',sans-serif;">
|
|
|
|
|
<h1>Diff to HTML by <a href="https://github.com/rtfpessoa">rtfpessoa</a></h1>
|
|
|
|
|
|
|
|
|
|
<h2>Line by Line</h2>
|
|
|
|
|
|
2014-09-14 19:50:17 +00:00
|
|
|
<div id="line-by-line" style="margin: 0 auto; max-width: 900px;">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<h2>Side by Side</h2>
|
|
|
|
|
|
|
|
|
|
<div id="side-by-side" style="margin: 0 auto;">
|
2014-09-08 17:15:51 +00:00
|
|
|
</div>
|
2014-09-06 16:27:18 +00:00
|
|
|
</body>
|
|
|
|
|
</html>
|