MCPcopy Create free account
hub / github.com/hackmdio/codimd / updateInfo

Function updateInfo

public/js/index.js:1771–1799  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

1769var authorMarks = {} // temp variable
1770var addTextMarkers = [] // temp variable
1771function updateInfo (data) {
1772 // console.log(data);
1773 if (Object.hasOwnProperty.call(data, 'createtime') && window.createtime !== data.createtime) {
1774 window.createtime = data.createtime
1775 updateLastChange()
1776 }
1777 if (Object.hasOwnProperty.call(data, 'updatetime') && window.lastchangetime !== data.updatetime) {
1778 window.lastchangetime = data.updatetime
1779 updateLastChange()
1780 }
1781 if (Object.hasOwnProperty.call(data, 'owner') && window.owner !== data.owner) {
1782 window.owner = data.owner
1783 window.ownerprofile = data.ownerprofile
1784 updateOwner()
1785 }
1786 if (Object.hasOwnProperty.call(data, 'lastchangeuser') && window.lastchangeuser !== data.lastchangeuser) {
1787 window.lastchangeuser = data.lastchangeuser
1788 window.lastchangeuserprofile = data.lastchangeuserprofile
1789 updateLastChangeUser()
1790 updateOwner()
1791 }
1792 if (Object.hasOwnProperty.call(data, 'authors') && authors !== data.authors) {
1793 authors = data.authors
1794 }
1795 if (Object.hasOwnProperty.call(data, 'authorship') && authorship !== data.authorship) {
1796 authorship = data.authorship
1797 updateAuthorship()
1798 }
1799}
1800var updateAuthorship = _.debounce(function () {
1801 editor.operation(updateAuthorshipInner)
1802}, 50)

Callers 1

index.jsFile · 0.85

Calls 3

updateLastChangeFunction · 0.90
updateOwnerFunction · 0.90
updateLastChangeUserFunction · 0.90

Tested by

no test coverage detected