remove the code to get create_time from wechat article in browser runtime
This commit is contained in:
@ -136,19 +136,7 @@
|
||||
document.documentElement.appendChild(contentCopyEl);
|
||||
|
||||
Array.from(contentCopyEl.getElementsByTagName('*')).forEach(prepareContentPostItem);
|
||||
try {
|
||||
// check if create_time is defined
|
||||
if (typeof create_time !== 'undefined' && create_time) {
|
||||
// create_time is a global variable set by WeChat when rendering the page
|
||||
const date = new Date(create_time * 1000);
|
||||
const dateNode = document.createElement('div');
|
||||
dateNode.className = 'omnivore-published-date';
|
||||
dateNode.innerHTML = date.toLocaleString();
|
||||
contentCopyEl.appendChild(dateNode);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log('Error while trying to add published date to WeChat post', e);
|
||||
}
|
||||
|
||||
/*
|
||||
* Grab head and body separately as using clone on entire document into a div
|
||||
* removes the head and body tags while grabbing html in them. Instead we
|
||||
|
||||
Reference in New Issue
Block a user