Merge branch 'v3'

Conflicts:
	LICENSE
	builds/appchan-x.user.js
	builds/crx/script.js
This commit is contained in:
Zixaphir 2014-03-09 15:09:44 -07:00
commit c7b044cc8e
5 changed files with 14 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
* appchan x - Version 2.9.0 - 2014-03-08
* appchan x - Version 2.9.0 - 2014-03-09
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE

View File

@ -25,7 +25,7 @@
// ==/UserScript==
/*
* appchan x - Version 2.9.0 - 2014-03-08
* appchan x - Version 2.9.0 - 2014-03-09
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -5977,7 +5977,9 @@
return Get.postFromRoot($.x('ancestor::div[contains(@class,"postContainer")][1]', node));
},
contextFromNode: function(node) {
return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', node));
var snapshot;
snapshot = $.X('ancestor::div[contains(@class,"postContainer")]', node);
return Get.postFromRoot(snapshot.snapshotItem(snapshot.length - 1));
},
postDataFromLink: function(link) {
var boardID, path, postID, threadID, _ref;
@ -7276,7 +7278,7 @@
fullID = post.fullID;
return g.posts.forEach(function(post) {
if (__indexOf.call(post.quotes, fullID) >= 0) {
return recursive.apply(null, [post].concat(__slice.call(args)));
return post[recursive].apply(post, args);
}
});
}

View File

@ -1,6 +1,6 @@
// Generated by CoffeeScript
/*
* appchan x - Version 2.9.0 - 2014-03-08
* appchan x - Version 2.9.0 - 2014-03-09
*
* Licensed under the MIT license.
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
@ -6035,7 +6035,9 @@
return Get.postFromRoot($.x('ancestor::div[contains(@class,"postContainer")][1]', node));
},
contextFromNode: function(node) {
return Get.postFromRoot($.x('ancestor::div[parent::div[@class="thread"]][1]', node));
var snapshot;
snapshot = $.X('ancestor::div[contains(@class,"postContainer")]', node);
return Get.postFromRoot(snapshot.snapshotItem(snapshot.length - 1));
},
postDataFromLink: function(link) {
var boardID, path, postID, threadID, _ref;
@ -7327,7 +7329,7 @@
fullID = post.fullID;
return g.posts.forEach(function(post) {
if (__indexOf.call(post.quotes, fullID) >= 0) {
return recursive.apply(null, [post].concat(__slice.call(args)));
return post[recursive].apply(post, args);
}
});
}

View File

@ -30,4 +30,4 @@ Recursive =
{fullID} = post
g.posts.forEach (post) ->
if fullID in post.quotes
recursive post, args...
post[recursive] args...

View File

@ -17,7 +17,8 @@ Get =
postFromNode: (node) ->
Get.postFromRoot $.x 'ancestor::div[contains(@class,"postContainer")][1]', node
contextFromNode: (node) ->
Get.postFromRoot $.x 'ancestor::div[parent::div[@class="thread"]][1]', node
snapshot = $.X 'ancestor::div[contains(@class,"postContainer")]', node
Get.postFromRoot snapshot.snapshotItem(snapshot.length - 1)
postDataFromLink: (link) ->
if link.hostname is 'boards.4chan.org'
path = link.pathname.split '/'