|
@@ -143,16 +143,16 @@ class Webshot extends CallableInstance<[LazyMediaItem[], (...args) => void, numb
|
|
|
.then(() => page.addStyleTag({
|
|
|
content: '*{font-family:-apple-system,".Helvetica Neue DeskInterface",Hiragino Sans,Hiragino Sans GB,sans-serif!important}',
|
|
|
}))
|
|
|
- // display absolute date and time and remove "comment limited" notice
|
|
|
+ // display absolute date and time, remove time element in thread and remove "comment limited" notice
|
|
|
.then(() => page.evaluate(() => {
|
|
|
- let time: HTMLTimeElement;
|
|
|
- time = document.querySelector('div>div>time');
|
|
|
+ let time = document.querySelector<HTMLTimeElement>('div>div>time');
|
|
|
if (time) time.parentElement.parentElement.style.display = 'none';
|
|
|
- time = document.querySelector('main section~div>a>time');
|
|
|
- if (time) {
|
|
|
+ const a = document.querySelector(`main section~div a[href="${new URL(location.href).pathname}"]`);
|
|
|
+ if (a) {
|
|
|
+ time = a.querySelector('time');
|
|
|
time.innerHTML = time.title + ' ' + new Date(time.dateTime).toLocaleTimeString().slice(0, -3);
|
|
|
- time.parentElement.parentElement.style.margin = '-24px 2px 12px';
|
|
|
- const element = time.parentElement.parentElement.nextElementSibling as HTMLElement;
|
|
|
+ a.parentElement.style.margin = '-24px 2px 12px';
|
|
|
+ const element = a.parentElement.nextElementSibling as HTMLElement;
|
|
|
if (element) element.style.display = 'none';
|
|
|
}
|
|
|
}))
|