Last active
July 10, 2020 06:54
-
-
Save knoajp/160082bde4402a4a7db684627bc5ef5d to your computer and use it in GitHub Desktop.
Twitter Before/After
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
let name = location.href.match(/twitter\.com\/([^/]+)\//)[1]; | |
let match = document.querySelector('a[href$="#source-labels"]').parentNode.firstElementChild.textContent.match(/([0-9]+)年([0-9]+)月([0-9]+)日/); | |
let date = new Date(`${match[1]}-${match[2]}-${match[3]}`) - 0, since = new Date(date - 1000*60*60*24).toISOString().substr(0,10), until = new Date(date + 1000*60*60*24).toISOString().substr(0,10); | |
location.assign(`https://twitter.com/search?q=from%3A${name}%20since%3A${since}%20until%3A${until}&f=live`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's for Japanese locale only, but you can customize the regexp and so on.
https://twitter.com/kantankikaku/status/1277445534207209472
Twitter should implement ISO/Unix time in the individual tweet view.
https://twitter.com/kantankikaku/status/1277434626043084800
日本語でしか動きませんが、正規表現などのカスタマイズは可能です。
https://twitter.com/kantankikaku/status/1277445534207209472
Twitterは個別ツイート画面にISO/Unix時刻を埋め込むべき。
https://twitter.com/kantankikaku/status/1277434626043084800