Site Notice
hello, world
Difference between revisions of "CompareApi"
m ([InPageEdit] 没有编辑摘要) |
m ([InPageEdit] 没有编辑摘要) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | * https://common.wjghj.cn/index.php?title=MediaWiki%3AJs-InPageEdit-v2.js&type=revision&diff=1238&oldid=1210 | ||
+ | * https://common.wjghj.cn/api.php?action=compare&fromrev=1238&totitle=MediaWiki%3AJs-InPageEdit-v2.js&prop=diff|diffsize|rel|ids|title|user|comment|parsedcomment|size | ||
+ | |||
返回数据如下: | 返回数据如下: | ||
− | <pre> | + | <pre class="prettyprint lang-json"> |
{ | { | ||
"compare": { | "compare": { | ||
− | "fromid": | + | "fromid": 50, |
− | "fromrevid": | + | "fromrevid": 1210, |
− | "fromns": | + | "fromns": 8, |
− | "fromtitle": " | + | "fromtitle": "MediaWiki:Js-InPageEdit-v2.js", |
− | "fromsize": | + | "fromsize": 38138, |
"fromuser": "机智的小鱼君", | "fromuser": "机智的小鱼君", | ||
"fromuserid": 1, | "fromuserid": 1, | ||
− | "fromcomment": "", | + | "fromcomment": "[InPageEdit] 没有编辑摘要", |
− | "fromparsedcomment": "", | + | "fromparsedcomment": "[InPageEdit] 没有编辑摘要", |
− | "toid": | + | "toid": 50, |
− | "torevid": | + | "torevid": 1238, |
− | "tons": | + | "tons": 8, |
− | "totitle": " | + | "totitle": "MediaWiki:Js-InPageEdit-v2.js", |
− | "tosize": | + | "tosize": 38285, |
"touser": "机智的小鱼君", | "touser": "机智的小鱼君", | ||
"touserid": 1, | "touserid": 1, | ||
− | "tocomment": "[InPageEdit] | + | "tocomment": "[InPageEdit] 使用严格模式", |
− | "toparsedcomment": "[InPageEdit] | + | "toparsedcomment": "[InPageEdit] 使用严格模式", |
− | "prev": | + | "prev": 1204, |
− | + | "diffsize": 2903, | |
− | "diffsize": | ||
"*": "这里是diff的表格" | "*": "这里是diff的表格" | ||
} | } | ||
Line 30: | Line 32: | ||
<html> | <html> | ||
− | <style> | + | <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"> | <table class="diff diffTable"> | ||
<colgroup> | <colgroup> | ||
Line 40: | Line 45: | ||
<tbody> | <tbody> | ||
<tr class="diff-title"> | <tr class="diff-title"> | ||
− | <td colspan="2" class="diff-otitle"> | + | <td colspan="2" class="diff-otitle"> |
− | <td colspan="2" class="diff-ntitle"> | + | |
+ | MediaWiki:Js-InPageEdit-v2.js(版本1201) [编辑]<br/> | ||
+ | 编辑者<br/> | ||
+ | (编辑摘要) | ||
+ | |||
+ | </td> | ||
+ | <td colspan="2" class="diff-ntitle"> | ||
+ | |||
+ | MediaWiki:Js-InPageEdit-v2.js(版本1238) [编辑] [撤销] <br/> | ||
+ | 编辑者<br/> | ||
+ | (编辑摘要) | ||
+ | |||
+ | </td> | ||
</tr> | </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"> </td><td class="diff-context"><div> **/</div></td><td class="diff-marker"> </td><td class="diff-context"><div> **/</div></td></tr> | ||
+ | <tr><td class="diff-marker"> </td><td class="diff-context"></td><td class="diff-marker"> </td><td class="diff-context"></td></tr> | ||
+ | <tr><td colspan="2"> </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"> </td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td><td class="diff-marker"> </td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td></tr> | ||
+ | <tr><td colspan="2"> </td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"></ins></div></td></tr> | ||
+ | <tr><td class="diff-marker"> </td><td class="diff-context"><div>// 创建全局函数</div></td><td class="diff-marker"> </td><td class="diff-context"><div>// 创建全局函数</div></td></tr> | ||
+ | <tr><td class="diff-marker"> </td><td class="diff-context"><div>var InPageEdit = {};</div></td><td class="diff-marker"> </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"> </td><td class="diff-context"><div> if (diff === '0') {</div></td><td class="diff-marker"> </td><td class="diff-context"><div> if (diff === '0') {</div></td></tr> | ||
+ | <tr><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td></tr> | ||
+ | <tr><td colspan="2"> </td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"> } else if (diff === 'prev' || diff === 'next' || diff === 'cur') {</ins></div></td></tr> | ||
+ | <tr><td colspan="2"> </td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"> InPageEdit.quickDiff({fromrev:oldid,torelative:diff});</ins></div></td></tr> | ||
+ | <tr><td class="diff-marker"> </td><td class="diff-context"><div> } else {</div></td><td class="diff-marker"> </td><td class="diff-context"><div> } else {</div></td></tr> | ||
+ | <tr><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td></tr> | ||
</tbody> | </tbody> | ||
</table> | </table> | ||
</html> | </html> |
Latest revision as of 18:49, 24 November 2019
- https://common.wjghj.cn/index.php?title=MediaWiki%3AJs-InPageEdit-v2.js&type=revision&diff=1238&oldid=1210
- https://common.wjghj.cn/api.php?action=compare&fromrev=1238&totitle=MediaWiki%3AJs-InPageEdit-v2.js&prop=diff%7Cdiffsize%7Crel%7Cids%7Ctitle%7Cuser%7Ccomment%7Cparsedcomment%7Csize
返回数据如下:
{ "compare": { "fromid": 50, "fromrevid": 1210, "fromns": 8, "fromtitle": "MediaWiki:Js-InPageEdit-v2.js", "fromsize": 38138, "fromuser": "机智的小鱼君", "fromuserid": 1, "fromcomment": "[InPageEdit] 没有编辑摘要", "fromparsedcomment": "[InPageEdit] 没有编辑摘要", "toid": 50, "torevid": 1238, "tons": 8, "totitle": "MediaWiki:Js-InPageEdit-v2.js", "tosize": 38285, "touser": "机智的小鱼君", "touserid": 1, "tocomment": "[InPageEdit] 使用严格模式", "toparsedcomment": "[InPageEdit] 使用严格模式", "prev": 1204, "diffsize": 2903, "*": "这里是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">
MediaWiki:Js-InPageEdit-v2.js(版本1201) [编辑]<br/> 编辑者<br/> (编辑摘要)
</td> <td colspan="2" class="diff-ntitle">
MediaWiki:Js-InPageEdit-v2.js(版本1238) [编辑] [撤销] <br/> 编辑者<br/> (编辑摘要)
</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"> </td><td class="diff-context"><div> **/</div></td><td class="diff-marker"> </td><td class="diff-context"><div> **/</div></td></tr> <tr><td class="diff-marker"> </td><td class="diff-context"></td><td class="diff-marker"> </td><td class="diff-context"></td></tr> <tr><td colspan="2"> </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"> </td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td><td class="diff-marker"> </td><td class="diff-context"><div>if (InPageEdit) throw '[InPageEdit] 已经有一个IPE插件在执行了';</div></td></tr> <tr><td colspan="2"> </td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"></ins></div></td></tr> <tr><td class="diff-marker"> </td><td class="diff-context"><div>// 创建全局函数</div></td><td class="diff-marker"> </td><td class="diff-context"><div>// 创建全局函数</div></td></tr> <tr><td class="diff-marker"> </td><td class="diff-context"><div>var InPageEdit = {};</div></td><td class="diff-marker"> </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"> </td><td class="diff-context"><div> if (diff === '0') {</div></td><td class="diff-marker"> </td><td class="diff-context"><div> if (diff === '0') {</div></td></tr> <tr><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,toid:curid});</div></td></tr> <tr><td colspan="2"> </td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"> } else if (diff === 'prev' || diff === 'next' || diff === 'cur') {</ins></div></td></tr> <tr><td colspan="2"> </td><td class="diff-marker">+</td><td class="diff-addedline"><div><ins class="diffchange"> InPageEdit.quickDiff({fromrev:oldid,torelative:diff});</ins></div></td></tr> <tr><td class="diff-marker"> </td><td class="diff-context"><div> } else {</div></td><td class="diff-marker"> </td><td class="diff-context"><div> } else {</div></td></tr> <tr><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td><td class="diff-marker"> </td><td class="diff-context"><div> InPageEdit.quickDiff({fromrev:oldid,torev:diff});</div></td></tr> </tbody> </table> </html>