Site Notice

hello, world

Difference between revisions of "CompareApi"

From Project-EPB Commons
([InPageEdit] 没有编辑摘要)
([InPageEdit] 没有编辑摘要)
Line 46: Line 46:
 
<td colspan="2" class="diff-ntitle">diff-ntitle placeholder</td>
 
<td colspan="2" class="diff-ntitle">diff-ntitle placeholder</td>
 
</tr>
 
</tr>
diffTable
+
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l15">第15行:</td>
 +
<td colspan="2" class="diff-lineno">第15行:</td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp; **/</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp; **/</div></td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"></td><td class="diff-marker">&nbsp;</td><td class="diff-context"></td></tr>
 +
<tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange">'use strict';</ins></div></td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td></tr>
 +
<tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"></ins></div></td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>// 创建全局函数</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>// 创建全局函数</div></td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>var InPageEdit = {};</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>var InPageEdit = {};</div></td></tr>
 +
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l660">第660行:</td>
 +
<td colspan="2" class="diff-lineno">第662行:</td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; if (diff === '0') {</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; if (diff === '0') {</div></td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td></tr>
 +
<tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange">&nbsp; &nbsp; } else if (diff === 'prev' || diff === 'next' || diff === 'cur') {</ins></div></td></tr>
 +
<tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange">&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,torelative:diff});</ins></div></td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; } else {</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; } else {</div></td></tr>
 +
<tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td></tr>
 
</tbody>
 
</tbody>
 
</table>
 
</table>
 
</html>
 
</html>

Revision as of 02:06, 24 November 2019

返回数据如下:

{
  "compare": {
    "fromid": 37,
    "fromrevid": 984,
    "fromns": 2,
    "fromtitle": "User:机智的小鱼君/common.js",
    "fromsize": 64,
    "fromuser": "机智的小鱼君",
    "fromuserid": 1,
    "fromcomment": "",
    "fromparsedcomment": "",
    "toid": 37,
    "torevid": 1167,
    "tons": 2,
    "totitle": "User:机智的小鱼君/common.js",
    "tosize": 289,
    "touser": "机智的小鱼君",
    "touserid": 1,
    "tocomment": "[InPageEdit] 没有编辑摘要",
    "toparsedcomment": "[InPageEdit] 没有编辑摘要",
    "prev": 983,
    "next": 1168,
    "diffsize": 1862,
    "*": "这里是diff的表格"
  }
}

<html> <style type="text/css">

.diff{border:0;border-spacing:4px;margin:0;width:100%;table-layout:fixed}.diff td{padding:0.33em 0.5em}.diff td.diff-marker{padding:0.25em}.diff col.diff-marker{width:2%}.diff .diff-content{width:48%}.diff td div{word-wrap:break-word}.diff-title{vertical-align:top}.diff-notice,.diff-multi,.diff-otitle,.diff-ntitle{text-align:center}.diff-lineno{font-weight:bold}td.diff-marker{text-align:right;font-weight:bold;font-size:1.25em;line-height:1.2}.diff-addedline,.diff-deletedline,.diff-context{font-size:88%;line-height:1.6;vertical-align:top;white-space:-moz-pre-wrap;white-space:pre-wrap;border-style:solid;border-width:1px 1px 1px 4px;border-radius:0.33em}.diff-addedline{border-color:#a3d3ff}.diff-deletedline{border-color:#ffe49c}.diff-context{background:#f8f9fa;border-color:#eaecf0;color:#222}.diffchange{font-weight:bold;text-decoration:none}.diff-addedline .diffchange,.diff-deletedline .diffchange{border-radius:0.33em;padding:0.25em 0}.diff-addedline .diffchange{background:#d8ecff}.diff-deletedline .diffchange{background:#feeec8}.diff-currentversion-title,.diff{direction:ltr;unicode-bidi:embed}.diff-contentalign-right td{direction:rtl;unicode-bidi:embed}.diff-contentalign-left td{direction:ltr;unicode-bidi:embed}.diff-multi,.diff-otitle,.diff-ntitle,.diff-lineno{direction:ltr !important;unicode-bidi:embed}.mw-diff-slot-header{text-align:center}.mw-diff-movedpara-left,.mw-diff-movedpara-right,.mw-diff-movedpara-left:visited,.mw-diff-movedpara-right:visited,.mw-diff-movedpara-left:active,.mw-diff-movedpara-right:active{display:block;color:transparent}.mw-diff-movedpara-left:hover,.mw-diff-movedpara-right:hover{text-decoration:none;color:transparent}.mw-diff-movedpara-left:after,.mw-diff-movedpara-right:after{display:block;color:#222;margin-top:-1.25em}.mw-diff-movedpara-left:after,.rtl .mw-diff-movedpara-right:after{content:'↪'}.mw-diff-movedpara-right:after,.rtl .mw-diff-movedpara-left:after{content:'↩'}@media print{td.diff-context,td.diff-addedline .diffchange,td.diff-deletedline .diffchange{background-color:transparent}td.diff-addedline .diffchange{text-decoration:underline}td.diff-deletedline .diffchange{text-decoration:line-through}} </style> <table class="diff diffTable"> <colgroup> <col class="diff-marker"> <col class="diff-content"> <col class="diff-marker"> <col class="diff-content"> </colgroup> <tbody> <tr class="diff-title"> <td colspan="2" class="diff-otitle">diff-otitle placeholder</td> <td colspan="2" class="diff-ntitle">diff-ntitle placeholder</td> </tr> <tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l15">第15行:</td> <td colspan="2" class="diff-lineno">第15行:</td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp; **/</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp; **/</div></td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"></td><td class="diff-marker">&nbsp;</td><td class="diff-context"></td></tr> <tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange">'use strict';</ins></div></td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"></ins></div></td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>// 创建全局函数</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>// 创建全局函数</div></td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>var InPageEdit = {};</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>var InPageEdit = {};</div></td></tr> <tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l660">第660行:</td> <td colspan="2" class="diff-lineno">第662行:</td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; if (diff === '0') {</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; if (diff === '0') {</div></td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td></tr> <tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange">&nbsp; &nbsp; } else if (diff === 'prev' || diff === 'next' || diff === 'cur') {</ins></div></td></tr> <tr><td colspan="2">&nbsp;</td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange">&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,torelative:diff});</ins></div></td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; } else {</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; } else {</div></td></tr> <tr><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td><td class="diff-marker">&nbsp;</td><td class="diff-context"><div>&nbsp;&nbsp; &nbsp; &nbsp; InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td></tr> </tbody> </table> </html>