61 Commits

Author SHA1 Message Date
Zixaphir
a0c24fd06d Fix some stupid threadupdater issues, more navigate from catalog js 2014-03-01 14:46:37 -07:00
Zixaphir
553a5a9133 Merge branch 'master' of https://github.com/Spittie/4chan-x into v3
Conflicts:
	CHANGELOG.md
	LICENSE
	builds/4chan-X.meta.js
	builds/4chan-X.user.js
	builds/crx/script.js
	src/General/Index.coffee
	src/Posting/QR.coffee
2014-02-28 19:37:26 -07:00
Zixaphir
811e3ccaf3 Use our implementation of Navigating between boards
Our custom navigation should now behave similar to Mayhem's, but
with JSON.
2014-02-28 18:56:02 -07:00
Zixaphir
5a76a9109c Cache boards.json 2014-02-28 18:29:52 -07:00
Kabir Sala
66e1e23e6a Partially fix #19 2014-02-27 16:37:18 +01:00
Kabir Sala
9a4199d829 Fix #14 2014-02-25 13:20:19 +01:00
Zixaphir
b3f937f5c8 Fix JSON Navigation unread count 2014-02-16 03:11:27 -07:00
Zixaphir
51ba83538a Better $.rmAll
I verified an issue with the previous benchmark and even wrote a
more efficient method based off el.cloneNode(false);, which I would
use if cloneNode could inherit eventListeners

Speaking of events. there is still no interface for gather all
eventListeners on a given element (or its children). Apparently the
issue is that the w3c doesn't think there is a legitimate use case
for it. Heh.
2014-01-24 16:10:04 -07:00
Zixaphir
b62d82bed0 Mayhem made responseType JSON default for any URL containing .json. 2014-01-24 14:48:39 -07:00
Zixaphir
b6749b91a5 Merge branch 'mayhem' into v3
Conflicts:
	CHANGELOG.md
	CONTRIBUTING.md
	css/style.css
	html/General/Settings-section-Main.html
	json/archives.json
	package.json
	src/Archive/Redirect.coffee
	src/General/Header.coffee
	src/General/Main.coffee
	src/General/Settings.coffee
	src/General/lib/$.coffee
	src/General/lib/thread.class
	src/Linkification/Linkify.coffee
	src/Miscellaneous/AnnouncementHiding.coffee
	src/Monitoring/ThreadStats.coffee
2014-01-22 12:10:34 -07:00
Zixaphir
3a61ecafff The good parts. 2014-01-18 16:53:48 -07:00
Zixaphir
b0ca427207 Revert "Fix updating the context of threads and index"
This reverts commit e7b1c52dbf9f25aec32bea64c712ee4075f7ef6f.
2014-01-18 14:11:36 -07:00
Zixaphir
e7b1c52dbf Fix updating the context of threads and index 2014-01-18 14:07:56 -07:00
Zixaphir
7d4825dce0 Add word boundaries to the style switcher regex 2014-01-18 13:39:02 -07:00
Zixaphir
8ddf2b4e5f Start working on tightening our control of the Navigation context
Currently breaks posting.

TODO:
* Fix style switching from NSFW to SFW (SFW to NSFW works)
  - It is worth noting this used to work.
* Fix post form not updating its currently selected thread.
* Fix navigation between threads in different boards (same boards
  works? Maybe?)
* Handle race conditions due to pop states.
  - I'm having a lot of trouble wrapping my mind around this one.
    Mostly due to the fact that I have no idea where to begin with
    it. But this isn't a big issue unless you pop state multiple
    times within seconds.

    I just need some exceptions when we try to disconnect features
    that haven't even finished connecting due to threads not being
    available yet.

Most of the early issues, like double-backlinks, incorrect
thumbnails, etc, have been fixed, I think. Or at least I'm no
longer running into them all the time.
2014-01-18 02:34:18 -07:00
Zixaphir
7eb2d0aa34 Mostly fix everything broken. Mostly. 2014-01-16 16:44:18 -07:00
Zixaphir
879206219b Oops 2014-01-16 00:51:47 -07:00
Zixaphir
19c8ffe4d6 Cruft 2014-01-15 17:10:46 -07:00
Zixaphir
30f4d0922b Don't change titles until we've successfully navigated. 2014-01-15 17:09:25 -07:00
Zixaphir
dc5daeba06 I really don't like iterating through objects. 2014-01-14 20:17:44 -07:00
Zixaphir
481ca6af72 Fix and use thread.collect for GC
Also merge appchan's JSON option fixes
2014-01-14 17:18:30 -07:00
Zixaphir
bcd7ab21e3 Make the JSON Navigation / Index features optional 2014-01-13 19:33:42 -07:00
Zixaphir
d8154e8ae2 Lets not push states for infinite scrolling. :) 2014-01-13 19:25:36 -07:00
Zixaphir
2c6a26ca89 Fix catalog link, fix Index on catalog.
It should have never ran on catalog, honestly.
2014-01-12 19:21:21 -07:00
Zixaphir
43bcc64681 Let Index.update handle its own page functions 2014-01-11 21:02:56 -07:00
Zixaphir
79776710af return 2014-01-11 20:22:45 -07:00
Zixaphir
ab3a4c6640 Get hash navigation working with Navigate.navigate() 2014-01-11 20:21:25 -07:00
Zixaphir
2e242a9f9d Holy, how tired was I when I did that? Damn. 2014-01-11 19:52:49 -07:00
Zixaphir
495567682b Fix duplicate backlinks 2014-01-11 19:34:07 -07:00
Zixaphir
6bafef092b Restore the hr at the bottom of threads 2014-01-11 12:51:14 -07:00
Zixaphir
a20e85d30f Features can *and should* handle under what context they disconnect 2014-01-11 12:03:50 -07:00
Zixaphir
1e24021c07 I think this was what I had meant to put there.
It checks unread count already anyways, and the previous behavior
was causing QuoteThreading.force() to run twice, and may have
caused an issue where backlinks were doubling-up? I don't know, I'm
still looking into that issue because it's happening on the Index
as well.
2014-01-11 11:37:11 -07:00
Zixaphir
c2ac7e66b1 Handle popstate on Chrome a bit better 2014-01-11 11:28:33 -07:00
Zixaphir
805c40d3bf Fix .current switcher
Single letter boards were matching, well... anything with their
board letter. I guess I wrote that pretty dumb, hah.
2014-01-11 11:14:35 -07:00
Zixaphir
1e7c617d80 Would be nice if I checked my case before committing, no? 2014-01-11 11:07:34 -07:00
Zixaphir
5222edafd4 Add a check for SFW status before we go stampeding all over it.
Lets not do more than we have to do, m'kay?
2014-01-11 11:04:14 -07:00
Zixaphir
d8bc0616e8 Strings y'all 2014-01-11 11:00:04 -07:00
Zixaphir
93c78e2d54 I like that just a little bit better. 2014-01-11 10:56:48 -07:00
Zixaphir
989f1b3c7b Further reduce redundancy in style switching.
Ok, I'm done with that now.
2014-01-11 10:50:49 -07:00
Zixaphir
9d6e29616d Get favicon switching working, reduce redundancy 2014-01-11 10:44:33 -07:00
Zixaphir
1900bbfa27 Fix Unread Count with JSON features 2014-01-10 23:41:09 -07:00
Zixaphir
685f74de50 Fix Navigate.popstate on Chrome 2014-01-10 23:14:02 -07:00
Zixaphir
865c5acfb6 We can now popstate pages. 2014-01-10 23:08:00 -07:00
Zixaphir
c61c71c764 Fix the QR's state upon navigation with JSON 2014-01-10 22:54:30 -07:00
Zixaphir
1555eb8166 Clones? No. 2014-01-10 21:16:56 -07:00
Zixaphir
44f2b5e434 Let's let the unread features determine how to scroll
I profiled this and on a 700 post thread, 30% time was spent trying
to figure out if we needed to scroll to the top of the thread or
not. I don't feel that's acceptable.
2014-01-10 19:04:15 -07:00
Zixaphir
6bd1d44b68 Unread Count actually requires the nodes to be on the page
Unfortunately
2014-01-10 18:55:33 -07:00
Zixaphir
bc9f094a77 Turns out I never finished my Thread Title magic...
because @MayhemYDG had already done it and done it better. So I
thought mine was working when it was just his... and then
realized when I didn't disconnect it and the index was getting a
title from a thread that it wasn't working and his was.

So let's just use his code.
2014-01-10 18:07:14 -07:00
Zixaphir
ebf6808297 Improve responsiveness of style switcher 2014-01-10 17:52:09 -07:00
Zixaphir
9c895eb632 How about making it actually work? 2014-01-10 14:59:50 -07:00