mirror of
https://github.com/wickedest/Mergely.git
synced 2026-04-01 10:18:36 +08:00
feat: new encoder (wip)
This commit is contained in:
@@ -4,15 +4,9 @@ require('codemirror/addon/selection/mark-selection.js');
|
||||
require('codemirror/lib/codemirror.css');
|
||||
require('../src/mergely.css');
|
||||
|
||||
const lhs = `\
|
||||
the quick red fox
|
||||
jumped over the hairy dog
|
||||
`;
|
||||
const lhs = `hello`;
|
||||
|
||||
const rhs = `\
|
||||
the quick brown fox
|
||||
jumped over the lazy dog
|
||||
`;
|
||||
const rhs = `hello\ngoodbye`;
|
||||
|
||||
|
||||
document.onreadystatechange = function () {
|
||||
@@ -22,6 +16,7 @@ document.onreadystatechange = function () {
|
||||
|
||||
const mergely = new Mergely('#compare', {
|
||||
license: 'lgpl',
|
||||
inline: 'words',
|
||||
lhs,
|
||||
rhs
|
||||
});
|
||||
|
||||
@@ -304,7 +304,6 @@ dog
|
||||
and the postman
|
||||
`
|
||||
}];
|
||||
console.log(data.length);
|
||||
for (let i = 0; i < data.length; ++i) {
|
||||
const { lhs, rhs } = data[i];
|
||||
const darkModeOptions = i === 11 ? {
|
||||
|
||||
@@ -298,7 +298,6 @@
|
||||
rhs.style = 'color:initial';
|
||||
});
|
||||
jQuery('#search-text').on('keypress', (ev) => {
|
||||
console.log(ev.which)
|
||||
if (event.which === 13) {
|
||||
ev.preventDefault();
|
||||
jQuery('#search').click();
|
||||
|
||||
Reference in New Issue
Block a user