Merge branch 'v3'

Conflicts:
	builds/appchan-x.user.js
	builds/crx/script.js
This commit is contained in:
Zixaphir 2014-03-09 16:04:52 -07:00
commit 0a39fff577
5 changed files with 39 additions and 42 deletions

View File

@ -188,8 +188,7 @@
'Menu': {
'Menu': [true, 'Add a drop-down menu to posts.'],
'Report Link': [true, 'Add a report link to the menu.'],
'Thread Hiding Link': [true, 'Add a link to hide entire threads.'],
'Reply Hiding Link': [true, 'Add a link to hide single replies.'],
'Post Hiding Link': [true, 'Add a link to hide posts.'],
'Delete Link': [true, 'Add post and image deletion links to the menu.'],
'Archive Link': [true, 'Add an archive link to the menu.']
},
@ -423,10 +422,10 @@
'Next page': ['Shift+Right', 'Jump to the next page.'],
'Previous page': ['Shift+Left', 'Jump to the previous page.'],
'Search form': ['Ctrl+Alt+s', 'Focus the search field on the board index.'],
'Paged mode': ['Ctrl+1', 'Sets the index mode to paged.'],
'All pages mode': ['Ctrl+2', 'Sets the index mode to all threads.'],
'Catalog mode': ['Ctrl+3', 'Sets the index mode to catalog.'],
'Cycle sort type': ['Ctrl+x', 'Cycle through index sort types.'],
'Paged mode': ['Alt+1', 'Sets the index mode to paged.'],
'All pages mode': ['Alt+2', 'Sets the index mode to all threads.'],
'Catalog mode': ['Alt+3', 'Sets the index mode to catalog.'],
'Cycle sort type': ['Alt+x', 'Cycle through index sort types.'],
'Next thread': ['Shift+Down', 'See next thread.'],
'Previous thread': ['Shift+Up', 'See previous thread.'],
'Expand thread': ['Ctrl+e', 'Expand thread.'],
@ -11696,12 +11695,10 @@
} else {
this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move><span id=update-status></span><span id=update-timer title='Update now'></span></div>");
$.addClass(doc, 'float');
$.ready((function(_this) {
return function() {
$.addClass(doc, 'float');
return $.add(d.body, sc);
};
})(this));
$.ready(function() {
$.addClass(doc, 'float');
return $.add(d.body, sc);
});
}
this.checkPostCount = 0;
this.timer = $('#update-timer', sc);
@ -12071,7 +12068,7 @@
if (Conf['Bottom Scroll']) {
return window.scrollTo(0, d.body.clientHeight);
} else {
return Header.scrollTo(posts.nodes[0]);
return Header.scrollTo(posts[0].nodes.root);
}
}
}
@ -15702,6 +15699,9 @@
Index.setIndexMode('catalog');
break;
case Conf['Cycle sort type']:
if (g.VIEW !== 'index') {
return;
}
Index.cycleSortType();
break;
case Conf['Next thread']:

View File

@ -163,8 +163,7 @@
'Menu': {
'Menu': [true, 'Add a drop-down menu to posts.'],
'Report Link': [true, 'Add a report link to the menu.'],
'Thread Hiding Link': [true, 'Add a link to hide entire threads.'],
'Reply Hiding Link': [true, 'Add a link to hide single replies.'],
'Post Hiding Link': [true, 'Add a link to hide posts.'],
'Delete Link': [true, 'Add post and image deletion links to the menu.'],
'Download Link': [true, 'Add a download with original filename link to the menu. Chrome-only currently.'],
'Archive Link': [true, 'Add an archive link to the menu.']
@ -398,10 +397,10 @@
'Next page': ['Shift+Right', 'Jump to the next page.'],
'Previous page': ['Shift+Left', 'Jump to the previous page.'],
'Search form': ['Ctrl+Alt+s', 'Focus the search field on the board index.'],
'Paged mode': ['Ctrl+1', 'Sets the index mode to paged.'],
'All pages mode': ['Ctrl+2', 'Sets the index mode to all threads.'],
'Catalog mode': ['Ctrl+3', 'Sets the index mode to catalog.'],
'Cycle sort type': ['Ctrl+x', 'Cycle through index sort types.'],
'Paged mode': ['Alt+1', 'Sets the index mode to paged.'],
'All pages mode': ['Alt+2', 'Sets the index mode to all threads.'],
'Catalog mode': ['Alt+3', 'Sets the index mode to catalog.'],
'Cycle sort type': ['Alt+x', 'Cycle through index sort types.'],
'Next thread': ['Shift+Down', 'See next thread.'],
'Previous thread': ['Shift+Up', 'See previous thread.'],
'Expand thread': ['Ctrl+e', 'Expand thread.'],
@ -11710,12 +11709,10 @@
} else {
this.dialog = sc = UI.dialog('updater', 'bottom: 0px; left: 0px;', "<div class=move><span id=update-status></span><span id=update-timer title='Update now'></span></div>");
$.addClass(doc, 'float');
$.ready((function(_this) {
return function() {
$.addClass(doc, 'float');
return $.add(d.body, sc);
};
})(this));
$.ready(function() {
$.addClass(doc, 'float');
return $.add(d.body, sc);
});
}
this.checkPostCount = 0;
this.timer = $('#update-timer', sc);
@ -12085,7 +12082,7 @@
if (Conf['Bottom Scroll']) {
return window.scrollTo(0, d.body.clientHeight);
} else {
return Header.scrollTo(posts.nodes[0]);
return Header.scrollTo(posts[0].nodes.root);
}
}
}
@ -15721,6 +15718,9 @@
Index.setIndexMode('catalog');
break;
case Conf['Cycle sort type']:
if (g.VIEW !== 'index') {
return;
}
Index.cycleSortType();
break;
case Conf['Next thread']:

View File

@ -177,13 +177,9 @@ Config =
true
'Add a report link to the menu.'
]
'Thread Hiding Link': [
'Post Hiding Link': [
true
'Add a link to hide entire threads.'
]
'Reply Hiding Link': [
true
'Add a link to hide single replies.'
'Add a link to hide posts.'
]
'Delete Link': [
true
@ -1005,19 +1001,19 @@ box-shadow: inset 2px 2px 2px rgba(0,0,0,0.2);
'Focus the search field on the board index.'
]
'Paged mode': [
'Ctrl+1'
'Alt+1'
'Sets the index mode to paged.'
]
'All pages mode': [
'Ctrl+2'
'Alt+2'
'Sets the index mode to all threads.'
]
'Catalog mode': [
'Ctrl+3'
'Alt+3'
'Sets the index mode to catalog.'
]
'Cycle sort type': [
'Ctrl+x'
'Alt+x'
'Cycle through index sort types.'
]
# Thread Navigation

View File

@ -114,6 +114,7 @@ Keybinds =
return unless g.VIEW is 'index' and Conf['Index Mode'] isnt 'catalog'
Index.setIndexMode 'catalog'
when Conf['Cycle sort type']
return unless g.VIEW is 'index'
Index.cycleSortType()
# Thread Navigation
when Conf['Next thread']

View File

@ -8,11 +8,11 @@ ThreadUpdater =
id: 'updater'
$.ready ->
Header.addShortcut sc
else
else
@dialog = sc = UI.dialog 'updater', 'bottom: 0px; left: 0px;',
"<div class=move><span id=update-status></span><span id=update-timer title='Update now'></span></div>"
$.addClass doc, 'float'
$.ready =>
$.ready ->
$.addClass doc, 'float'
$.add d.body, sc
@ -57,12 +57,12 @@ ThreadUpdater =
Thread.callbacks.push
name: 'Thread Updater'
cb: @node
disconnect: ->
return if g.VIEW isnt 'thread' or !Conf['Thread Updater']
$.off @timer, 'click', @update
$.off @status, 'click', @update
clearTimeout @timeoutID if @timeoutID
for entry in @entry.subEntries
@ -183,7 +183,7 @@ ThreadUpdater =
setInterval: ->
i = ThreadUpdater.interval + 1
if Conf['Optional Increase']
# Lower the max refresh rate limit on visible tabs.
cur = ThreadUpdater.outdateCount or 1
@ -348,4 +348,4 @@ ThreadUpdater =
if Conf['Bottom Scroll']
window.scrollTo 0, d.body.clientHeight
else
Header.scrollTo posts.nodes[0]
Header.scrollTo posts[0].nodes.root