Merge branch 'v3'
Conflicts: LICENSE builds/appchan-x.user.js builds/crx/script.js
This commit is contained in:
commit
f301f1c2c2
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* appchan x - Version 2.8.7 - 2014-01-19
|
||||
* appchan x - Version 2.8.7 - 2014-01-21
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* appchan x - Version 2.8.7 - 2014-01-19
|
||||
* appchan x - Version 2.8.7 - 2014-01-21
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -5515,32 +5515,19 @@
|
||||
return Get.insert(post, root, context);
|
||||
},
|
||||
parseMarkup: function(text) {
|
||||
switch (text) {
|
||||
case '\n':
|
||||
return '<br>';
|
||||
case '[b]':
|
||||
return '<b>';
|
||||
case '[/b]':
|
||||
return '</b>';
|
||||
case '[spoiler]':
|
||||
return '<s>';
|
||||
case '[/spoiler]':
|
||||
return '</s>';
|
||||
case '[code]':
|
||||
return '<pre class=prettyprint>';
|
||||
case '[/code]':
|
||||
return '</pre>';
|
||||
case '[moot]':
|
||||
return '<div style="padding:5px;margin-left:.5em;border-color:#faa;border:2px dashed rgba(255,0,0,.1);border-radius:2px">';
|
||||
case '[/moot]':
|
||||
return '</div>';
|
||||
case '[banned]':
|
||||
return '<strong style="color: red;">';
|
||||
case '[/banned]':
|
||||
return '</strong>';
|
||||
default:
|
||||
return text.replace(':lit', '');
|
||||
}
|
||||
return {
|
||||
'\n': '<br>',
|
||||
'[b]': '<b>',
|
||||
'[/b]': '</b>',
|
||||
'[spoiler]': '<s>',
|
||||
'[/spoiler]': '</s>',
|
||||
'[code]': '<pre class=prettyprint>',
|
||||
'[/code]': '</pre>',
|
||||
'[moot]': '<div style="padding:5px;margin-left:.5em;border-color:#faa;border:2px dashed rgba(255,0,0,.1);border-radius:2px">',
|
||||
'[/moot]': '</div>',
|
||||
'[banned]': '<strong style="color: red;">',
|
||||
'[/banned]': '</strong>'
|
||||
}[text] || text.replace(':lit', '');
|
||||
}
|
||||
};
|
||||
|
||||
@ -10169,9 +10156,9 @@
|
||||
return ImageExpand.toggle(Get.postFromNode(this));
|
||||
},
|
||||
toggleAll: function() {
|
||||
var func;
|
||||
var func, toggle;
|
||||
$.event('CloseMenu');
|
||||
func = function(post) {
|
||||
toggle = function(post) {
|
||||
var file;
|
||||
file = post.file;
|
||||
if (!(file && file.isImage && doc.contains(post.nodes.root))) {
|
||||
@ -10193,11 +10180,11 @@
|
||||
}
|
||||
return g.posts.forEach(function(post) {
|
||||
var _i, _len, _ref;
|
||||
func(post);
|
||||
toggle(post);
|
||||
_ref = post.clones;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
post = _ref[_i];
|
||||
func(post);
|
||||
toggle(post);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* appchan x - Version 2.8.7 - 2014-01-19
|
||||
* appchan x - Version 2.8.7 - 2014-01-21
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/zixaphir/appchan-x/blob/master/LICENSE
|
||||
@ -5525,32 +5525,19 @@
|
||||
return Get.insert(post, root, context);
|
||||
},
|
||||
parseMarkup: function(text) {
|
||||
switch (text) {
|
||||
case '\n':
|
||||
return '<br>';
|
||||
case '[b]':
|
||||
return '<b>';
|
||||
case '[/b]':
|
||||
return '</b>';
|
||||
case '[spoiler]':
|
||||
return '<s>';
|
||||
case '[/spoiler]':
|
||||
return '</s>';
|
||||
case '[code]':
|
||||
return '<pre class=prettyprint>';
|
||||
case '[/code]':
|
||||
return '</pre>';
|
||||
case '[moot]':
|
||||
return '<div style="padding:5px;margin-left:.5em;border-color:#faa;border:2px dashed rgba(255,0,0,.1);border-radius:2px">';
|
||||
case '[/moot]':
|
||||
return '</div>';
|
||||
case '[banned]':
|
||||
return '<strong style="color: red;">';
|
||||
case '[/banned]':
|
||||
return '</strong>';
|
||||
default:
|
||||
return text.replace(':lit', '');
|
||||
}
|
||||
return {
|
||||
'\n': '<br>',
|
||||
'[b]': '<b>',
|
||||
'[/b]': '</b>',
|
||||
'[spoiler]': '<s>',
|
||||
'[/spoiler]': '</s>',
|
||||
'[code]': '<pre class=prettyprint>',
|
||||
'[/code]': '</pre>',
|
||||
'[moot]': '<div style="padding:5px;margin-left:.5em;border-color:#faa;border:2px dashed rgba(255,0,0,.1);border-radius:2px">',
|
||||
'[/moot]': '</div>',
|
||||
'[banned]': '<strong style="color: red;">',
|
||||
'[/banned]': '</strong>'
|
||||
}[text] || text.replace(':lit', '');
|
||||
}
|
||||
};
|
||||
|
||||
@ -10152,9 +10139,9 @@
|
||||
return ImageExpand.toggle(Get.postFromNode(this));
|
||||
},
|
||||
toggleAll: function() {
|
||||
var func;
|
||||
var func, toggle;
|
||||
$.event('CloseMenu');
|
||||
func = function(post) {
|
||||
toggle = function(post) {
|
||||
var file;
|
||||
file = post.file;
|
||||
if (!(file && file.isImage && doc.contains(post.nodes.root))) {
|
||||
@ -10176,11 +10163,11 @@
|
||||
}
|
||||
return g.posts.forEach(function(post) {
|
||||
var _i, _len, _ref;
|
||||
func(post);
|
||||
toggle(post);
|
||||
_ref = post.clones;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
post = _ref[_i];
|
||||
func(post);
|
||||
toggle(post);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@ -215,28 +215,16 @@ Get =
|
||||
Main.callbackNodes Post, [post]
|
||||
Get.insert post, root, context
|
||||
parseMarkup: (text) ->
|
||||
switch text
|
||||
when '\n'
|
||||
'<br>'
|
||||
when '[b]'
|
||||
'<b>'
|
||||
when '[/b]'
|
||||
'</b>'
|
||||
when '[spoiler]'
|
||||
'<s>'
|
||||
when '[/spoiler]'
|
||||
'</s>'
|
||||
when '[code]'
|
||||
'<pre class=prettyprint>'
|
||||
when '[/code]'
|
||||
'</pre>'
|
||||
when '[moot]'
|
||||
'<div style="padding:5px;margin-left:.5em;border-color:#faa;border:2px dashed rgba(255,0,0,.1);border-radius:2px">'
|
||||
when '[/moot]'
|
||||
'</div>'
|
||||
when '[banned]'
|
||||
'<strong style="color: red;">'
|
||||
when '[/banned]'
|
||||
'</strong>'
|
||||
else
|
||||
text.replace ':lit', ''
|
||||
{
|
||||
'\n': '<br>'
|
||||
'[b]': '<b>'
|
||||
'[/b]': '</b>'
|
||||
'[spoiler]': '<s>'
|
||||
'[/spoiler]': '</s>'
|
||||
'[code]': '<pre class=prettyprint>'
|
||||
'[/code]': '</pre>'
|
||||
'[moot]': '<div style="padding:5px;margin-left:.5em;border-color:#faa;border:2px dashed rgba(255,0,0,.1);border-radius:2px">'
|
||||
'[/moot]': '</div>'
|
||||
'[banned]': '<strong style="color: red;">'
|
||||
'[/banned]': '</strong>'
|
||||
}[text] or text.replace ':lit', ''
|
||||
@ -33,9 +33,10 @@ ImageExpand =
|
||||
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||
e.preventDefault()
|
||||
ImageExpand.toggle Get.postFromNode @
|
||||
|
||||
toggleAll: ->
|
||||
$.event 'CloseMenu'
|
||||
func = (post) ->
|
||||
toggle = (post) ->
|
||||
{file} = post
|
||||
return unless file and file.isImage and doc.contains post.nodes.root
|
||||
if ImageExpand.on and
|
||||
@ -43,6 +44,7 @@ ImageExpand =
|
||||
Conf['Expand from here'] and Header.getTopOf(file.thumb) < 0)
|
||||
return
|
||||
$.queueTask func, post
|
||||
|
||||
if ImageExpand.on = $.hasClass ImageExpand.EAI, 'expand-all-shortcut'
|
||||
ImageExpand.EAI.className = 'contract-all-shortcut a-icon'
|
||||
ImageExpand.EAI.title = 'Contract All Images'
|
||||
@ -51,10 +53,12 @@ ImageExpand =
|
||||
ImageExpand.EAI.className = 'expand-all-shortcut a-icon'
|
||||
ImageExpand.EAI.title = 'Expand All Images'
|
||||
func = ImageExpand.contract
|
||||
|
||||
g.posts.forEach (post) ->
|
||||
func post
|
||||
func post for post in post.clones
|
||||
toggle post
|
||||
toggle post for post in post.clones
|
||||
return
|
||||
|
||||
setFitness: ->
|
||||
(if @checked then $.addClass else $.rmClass) doc, @name.toLowerCase().replace /\s+/g, '-'
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user