User:Cacycle/diff.js: Difference between revisions

Content deleted Content added
1.1.5 (September 25, 2014) fic colored blocks customization, fixed double fragment markup
1.1.6 (September 25, 2014) block hover css, rm debug
Line 3:
// ==UserScript==
// @name wikEd diff
// @version 1.1.56
// @date September 25, 2014
// @description improved word-based diff library with block move detection
Line 126:
//
 
// Showshow complete unshortenedun-clipped diff text
if (wDiff.fullDiff === undefined) { wDiff.fullDiff = false; }
 
Line 132:
if (wDiff.showBlockMoves === undefined) { wDiff.showBlockMoves = true; }
 
// refine word-based toenable character-basedrefined diff
if (wDiff.charDiff === undefined) { wDiff.charDiff = true; }
 
Line 141:
if (wDiff.unlinkBlocks === undefined) { wDiff.unlinkBlocks = true; }
 
// do not reject blocks if longershorter than this number of real words
if (wDiff.blockMinLength === undefined) { wDiff.blockMinLength = 3; }
 
Line 298:
// newline
'.wDiffNewline:before { content: "¶"; color: transparent; }' +
'.wDiffBlockLeft:hover .wDiffNewline:before, .wDiffBlockRight:hover .wDiffNewline:before { color: #aaa; }' +
'.wDiffBlockHighlight .wDiffNewline:before { color: transparent; }' +
'.wDiffBlockHighlight:hover .wDiffNewline:before { color: #ccc; }' +
Line 316 ⟶ 317:
'.wDiffSpaceSymbol { position: absolute; top: -0.2em; left: -0.05em; }' +
'.wDiffSpaceSymbol:before { content: "·"; color: transparent; }' +
'.wDiffBlockLeft:hover .wDiffSpaceSymbol:before, .wDiffBlockRight:hover .wDiffSpaceSymbol:before { color: #999; }' +
'.wDiffBlockHighlight .wDiffSpaceSymbol:before { color: transparent; }' +
'.wDiffBlockHighlight:hover .wDiffSpaceSymbol:before { color: #ddd; }' +
'.wDiffBlockHighlight:hover .wDiffInsert .wDiffSpaceSymbol:before, .wDiffInsert:hover .wDiffSpaceSymbol:before { color: #888; }' +
'.wDiffBlockHighlight:hover .wDiffDelete .wDiffSpaceSymbol:before, .wDiffDelete:hover .wDiffSpaceSymbol:before { color: #999; }' +
 
 
// error
Line 3,335 ⟶ 3,338:
 
this.htmlFormat = function () {
 
console.trace();
this.html = this.html.replace(/\t/g, wDiff.htmlTab);
this.html = wDiff.htmlContainerStart + this.html + wDiff.htmlContainerEnd;