Добавляет время поста в заголовок *вкладки*
这些是此脚本的所有版本。 只显示代码变更过的版本。
Старый (v0.31):
/posts/
if (!window.location.pathname.includes('/posts/')) return;
window.addEventListener('load')
MutationObserver
setTimeout(3000)
load
Новый (v0.4):
@match https://boosty.to/*
bodyObserver
<body>
h1
titleObserver
currentFormattedTitle
currentPostId
data-post-id
#column-1 [data-test-id="COMMON_POST:ROOT"]
titleObserver.disconnect()
currentPostId = null
currentFormattedTitle = null
getPostTime()
[class*="CreatedAt"][class*="headerLink"]
getPostTitle()
[class*="Post_title"]
document.querySelector('#column-1 [data-test-id="COMMON_POST:ROOT"]')
postElement.querySelector('h1[data-test-id="COMMON_POST_POSTCONTENT:TITLE"]', ...)
h2
parseBoostyDate
try...catch