Squash of 21 commits: -- Document "%R" relative time formatter Sounds reasonable, don't you think? -- Implement %R time formatter original code do not steal -- Add absolute time as title on date elements -- Update relative post times if necessary Coupled code, I know. Would be better to have a 'threadupdate' event to subscribe to, oh well. -- Update changelog -- Rewrite relative date formatter function Aeosynth-approved, or at least acknoledged -- Reimplement relative post times in namespace Less quick-and-dirty, more right. Still need to polyfill visibility -- Polyfill and correct usage of page visibility Reselecting the tab always flushes (since ui thread block will be percieved as part of the tab switch), but background flushes don't queue when tab is not visible. This is actually a better implementation than html5chan has right now, will need to backport it later. -- Remove %R reference in documentation -- Clean up RelativeDates code Aeosynth approved (TM) (C) -- Move page visibility polyfill to Main -- Remove unnecessary ? -- Replace $.hidden() fn with d.hidden -- Use visibility polyfill for QR -- Remove all future relative dates Looks like it's all over after this. -- Compact pluralize condition -- Fix alignment -- Change RelativeDates.flush -> @flush -- Remove initial setTimeout Is unnecessary, as node is called, which will call flush at least once and set the timeout again. -- Improve absolute date display and cache diff Title tooltip now uses either time formatting rice or the original 4chan timestamp instead of toString(). the diff between a date and now is now shared between `relative` and `setUpdate` to avoid recalculation. -- Remove re-calling of Time formatting Relying on the ordering of `node` callbacks, so textContext will already have the formatted time.
Get 4chan X HERE.
Building
- Install node.js.
- Install CoffeeScript with
npm install -g coffee-script. - Clone 4chan X.
cdinto it and build withcake build.- For development (continuous builds), run
cake dev &. Kill the process withkillall node.
Releasing
- Upgrade version with
cake -v VERSION upgrade. Note that this is only used to release new 4chan x versions, and is not needed or wanted in pull requests.
Contributing
- Edit the CoffeeScript source
- Build the JavaScript
- If the edits affect regular users, edit the changelog
- Fork the repo
- Send a pull request
Description
Languages
JavaScript
82.4%
CoffeeScript
14.3%
CSS
2%
HTML
1%
Makefile
0.2%