Release 4chan X v1.8.3.
This commit is contained in:
parent
4b8a4be8cd
commit
3fa3df215a
@ -1,3 +1,6 @@
|
|||||||
|
### v1.8.3
|
||||||
|
*2014-07-01*
|
||||||
|
|
||||||
**ccd0**
|
**ccd0**
|
||||||
- Fix `Reveal Spoiler Thumbnails` on archived posts.
|
- Fix `Reveal Spoiler Thumbnails` on archived posts.
|
||||||
|
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.8.2 - 2014-06-30
|
* 4chan X - Version 1.8.3 - 2014-07-01
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.8.2
|
// @version 1.8.3
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.8.2
|
// @version 1.8.3
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.8.2 - 2014-06-30
|
* 4chan X - Version 1.8.3 - 2014-07-01
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -375,7 +375,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.8.2',
|
VERSION: '1.8.3',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -1108,7 +1108,7 @@
|
|||||||
size *= 1024;
|
size *= 1024;
|
||||||
}
|
}
|
||||||
this.file.sizeInBytes = size;
|
this.file.sizeInBytes = size;
|
||||||
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
this.file.thumbURL = "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
||||||
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
||||||
this.file.isVideo = /webm$/i.test(this.file.URL);
|
this.file.isVideo = /webm$/i.test(this.file.URL);
|
||||||
nameNode = $('a', fileText);
|
nameNode = $('a', fileText);
|
||||||
@ -3578,6 +3578,7 @@
|
|||||||
post = new Post(Build.post(o), thread, board, {
|
post = new Post(Build.post(o), thread, board, {
|
||||||
isArchived: true
|
isArchived: true
|
||||||
});
|
});
|
||||||
|
post.file.thumbURL = o.file.turl;
|
||||||
post.isFetchedQuote = true;
|
post.isFetchedQuote = true;
|
||||||
Main.callbackNodes(Post, [post]);
|
Main.callbackNodes(Post, [post]);
|
||||||
return Get.insert(post, root, context);
|
return Get.insert(post, root, context);
|
||||||
@ -11421,84 +11422,81 @@
|
|||||||
return FileInfo.format(Conf['fileInfo'], this, this.file.text.firstElementChild);
|
return FileInfo.format(Conf['fileInfo'], this, this.file.text.firstElementChild);
|
||||||
},
|
},
|
||||||
format: function(formatString, post, outputNode) {
|
format: function(formatString, post, outputNode) {
|
||||||
var output;
|
FileInfo.innerHTML = '';
|
||||||
output = {
|
|
||||||
innerHTML: ''
|
|
||||||
};
|
|
||||||
formatString.replace(/%(.)|[^%]+/g, function(s, c) {
|
formatString.replace(/%(.)|[^%]+/g, function(s, c) {
|
||||||
if (c in FileInfo.formatters) {
|
if (c in FileInfo.formatters) {
|
||||||
FileInfo.formatters[c].call(post, output);
|
FileInfo.formatters[c].call(post);
|
||||||
} else {
|
} else {
|
||||||
output.innerHTML += E(s);
|
FileInfo.innerHTML += E(s);
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
});
|
});
|
||||||
return outputNode.innerHTML = output.innerHTML;
|
return outputNode.innerHTML = FileInfo.innerHTML;
|
||||||
},
|
},
|
||||||
formatters: {
|
formatters: {
|
||||||
t: function(x) {
|
t: function() {
|
||||||
var timestamp;
|
var timestamp;
|
||||||
timestamp = this.file.URL.match(/\d+\..+$/)[0];
|
timestamp = this.file.URL.match(/\d+\..+$/)[0];
|
||||||
return x.innerHTML += E(timestamp);
|
return FileInfo.innerHTML += E(timestamp);
|
||||||
},
|
},
|
||||||
T: function(x) {
|
T: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.t.call(this, x);
|
FileInfo.formatters.t.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
l: function(x) {
|
l: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.n.call(this, x);
|
FileInfo.formatters.n.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
L: function(x) {
|
L: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.N.call(this, x);
|
FileInfo.formatters.N.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
n: function(x) {
|
n: function() {
|
||||||
var fullname, shortname;
|
var fullname, shortname;
|
||||||
fullname = this.file.name;
|
fullname = this.file.name;
|
||||||
shortname = Build.shortFilename(this.file.name, this.isReply);
|
shortname = Build.shortFilename(this.file.name, this.isReply);
|
||||||
if (fullname === shortname) {
|
if (fullname === shortname) {
|
||||||
return x.innerHTML += E(fullname);
|
return FileInfo.innerHTML += E(fullname);
|
||||||
} else {
|
} else {
|
||||||
return x.innerHTML += "<span class='fnswitch'><span class='fntrunc'>" + (E(shortname)) + "</span><span class='fnfull'>" + (E(fullname)) + "</span></span>";
|
return FileInfo.innerHTML += "<span class='fnswitch'><span class='fntrunc'>" + (E(shortname)) + "</span><span class='fnfull'>" + (E(fullname)) + "</span></span>";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
N: function(x) {
|
N: function() {
|
||||||
return x.innerHTML += E(this.file.name);
|
return FileInfo.innerHTML += E(this.file.name);
|
||||||
},
|
},
|
||||||
p: function(x) {
|
p: function() {
|
||||||
if (this.file.isSpoiler) {
|
if (this.file.isSpoiler) {
|
||||||
return x.innerHTML += 'Spoiler, ';
|
return FileInfo.innerHTML += 'Spoiler, ';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
s: function(x) {
|
s: function() {
|
||||||
return x.innerHTML += E(this.file.size);
|
return FileInfo.innerHTML += E(this.file.size);
|
||||||
},
|
},
|
||||||
B: function(x) {
|
B: function() {
|
||||||
var sizeB;
|
var sizeB;
|
||||||
sizeB = Math.round(this.file.sizeInBytes);
|
sizeB = Math.round(this.file.sizeInBytes);
|
||||||
return x.innerHTML += "" + (+sizeB) + " Bytes";
|
return FileInfo.innerHTML += "" + (+sizeB) + " Bytes";
|
||||||
},
|
},
|
||||||
K: function(x) {
|
K: function() {
|
||||||
var sizeKB;
|
var sizeKB;
|
||||||
sizeKB = Math.round(this.file.sizeInBytes / 1024);
|
sizeKB = Math.round(this.file.sizeInBytes / 1024);
|
||||||
return x.innerHTML += "" + (+sizeKB) + " KB";
|
return FileInfo.innerHTML += "" + (+sizeKB) + " KB";
|
||||||
},
|
},
|
||||||
M: function(x) {
|
M: function() {
|
||||||
var sizeMB;
|
var sizeMB;
|
||||||
sizeMB = Math.round(this.file.sizeInBytes / 1048576 * 100) / 100;
|
sizeMB = Math.round(this.file.sizeInBytes / 1048576 * 100) / 100;
|
||||||
return x.innerHTML += "" + (+sizeMB) + " MB";
|
return FileInfo.innerHTML += "" + (+sizeMB) + " MB";
|
||||||
},
|
},
|
||||||
r: function(x) {
|
r: function() {
|
||||||
var dim;
|
var dim;
|
||||||
dim = this.file.dimensions || 'PDF';
|
dim = this.file.dimensions || 'PDF';
|
||||||
return x.innerHTML += E(dim);
|
return FileInfo.innerHTML += E(dim);
|
||||||
},
|
},
|
||||||
'%': function(x) {
|
'%': function() {
|
||||||
return x.innerHTML += '%';
|
return FileInfo.innerHTML += '%';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -12403,7 +12401,7 @@
|
|||||||
Settings.dialog = dialog = $.el('div', {
|
Settings.dialog = dialog = $.el('div', {
|
||||||
id: 'fourchanx-settings',
|
id: 'fourchanx-settings',
|
||||||
className: 'dialog',
|
className: 'dialog',
|
||||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.2</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.3</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||||
});
|
});
|
||||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||||
@ -13255,7 +13253,7 @@
|
|||||||
}
|
}
|
||||||
if (previousversion) {
|
if (previousversion) {
|
||||||
el = $.el('span', {
|
el = $.el('span', {
|
||||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.2</a>.'
|
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.3</a>.'
|
||||||
});
|
});
|
||||||
new Notice('info', el, 15);
|
new Notice('info', el, 15);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.8.2
|
// @version 1.8.3
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -23,7 +23,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.8.2 - 2014-06-30
|
* 4chan X - Version 1.8.3 - 2014-07-01
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -374,7 +374,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.8.2',
|
VERSION: '1.8.3',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -1107,7 +1107,7 @@
|
|||||||
size *= 1024;
|
size *= 1024;
|
||||||
}
|
}
|
||||||
this.file.sizeInBytes = size;
|
this.file.sizeInBytes = size;
|
||||||
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
this.file.thumbURL = "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
||||||
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
||||||
this.file.isVideo = /webm$/i.test(this.file.URL);
|
this.file.isVideo = /webm$/i.test(this.file.URL);
|
||||||
nameNode = $('a', fileText);
|
nameNode = $('a', fileText);
|
||||||
@ -3577,6 +3577,7 @@
|
|||||||
post = new Post(Build.post(o), thread, board, {
|
post = new Post(Build.post(o), thread, board, {
|
||||||
isArchived: true
|
isArchived: true
|
||||||
});
|
});
|
||||||
|
post.file.thumbURL = o.file.turl;
|
||||||
post.isFetchedQuote = true;
|
post.isFetchedQuote = true;
|
||||||
Main.callbackNodes(Post, [post]);
|
Main.callbackNodes(Post, [post]);
|
||||||
return Get.insert(post, root, context);
|
return Get.insert(post, root, context);
|
||||||
@ -11420,84 +11421,81 @@
|
|||||||
return FileInfo.format(Conf['fileInfo'], this, this.file.text.firstElementChild);
|
return FileInfo.format(Conf['fileInfo'], this, this.file.text.firstElementChild);
|
||||||
},
|
},
|
||||||
format: function(formatString, post, outputNode) {
|
format: function(formatString, post, outputNode) {
|
||||||
var output;
|
FileInfo.innerHTML = '';
|
||||||
output = {
|
|
||||||
innerHTML: ''
|
|
||||||
};
|
|
||||||
formatString.replace(/%(.)|[^%]+/g, function(s, c) {
|
formatString.replace(/%(.)|[^%]+/g, function(s, c) {
|
||||||
if (c in FileInfo.formatters) {
|
if (c in FileInfo.formatters) {
|
||||||
FileInfo.formatters[c].call(post, output);
|
FileInfo.formatters[c].call(post);
|
||||||
} else {
|
} else {
|
||||||
output.innerHTML += E(s);
|
FileInfo.innerHTML += E(s);
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
});
|
});
|
||||||
return outputNode.innerHTML = output.innerHTML;
|
return outputNode.innerHTML = FileInfo.innerHTML;
|
||||||
},
|
},
|
||||||
formatters: {
|
formatters: {
|
||||||
t: function(x) {
|
t: function() {
|
||||||
var timestamp;
|
var timestamp;
|
||||||
timestamp = this.file.URL.match(/\d+\..+$/)[0];
|
timestamp = this.file.URL.match(/\d+\..+$/)[0];
|
||||||
return x.innerHTML += E(timestamp);
|
return FileInfo.innerHTML += E(timestamp);
|
||||||
},
|
},
|
||||||
T: function(x) {
|
T: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.t.call(this, x);
|
FileInfo.formatters.t.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
l: function(x) {
|
l: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.n.call(this, x);
|
FileInfo.formatters.n.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
L: function(x) {
|
L: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.N.call(this, x);
|
FileInfo.formatters.N.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
n: function(x) {
|
n: function() {
|
||||||
var fullname, shortname;
|
var fullname, shortname;
|
||||||
fullname = this.file.name;
|
fullname = this.file.name;
|
||||||
shortname = Build.shortFilename(this.file.name, this.isReply);
|
shortname = Build.shortFilename(this.file.name, this.isReply);
|
||||||
if (fullname === shortname) {
|
if (fullname === shortname) {
|
||||||
return x.innerHTML += E(fullname);
|
return FileInfo.innerHTML += E(fullname);
|
||||||
} else {
|
} else {
|
||||||
return x.innerHTML += "<span class='fnswitch'><span class='fntrunc'>" + (E(shortname)) + "</span><span class='fnfull'>" + (E(fullname)) + "</span></span>";
|
return FileInfo.innerHTML += "<span class='fnswitch'><span class='fntrunc'>" + (E(shortname)) + "</span><span class='fnfull'>" + (E(fullname)) + "</span></span>";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
N: function(x) {
|
N: function() {
|
||||||
return x.innerHTML += E(this.file.name);
|
return FileInfo.innerHTML += E(this.file.name);
|
||||||
},
|
},
|
||||||
p: function(x) {
|
p: function() {
|
||||||
if (this.file.isSpoiler) {
|
if (this.file.isSpoiler) {
|
||||||
return x.innerHTML += 'Spoiler, ';
|
return FileInfo.innerHTML += 'Spoiler, ';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
s: function(x) {
|
s: function() {
|
||||||
return x.innerHTML += E(this.file.size);
|
return FileInfo.innerHTML += E(this.file.size);
|
||||||
},
|
},
|
||||||
B: function(x) {
|
B: function() {
|
||||||
var sizeB;
|
var sizeB;
|
||||||
sizeB = Math.round(this.file.sizeInBytes);
|
sizeB = Math.round(this.file.sizeInBytes);
|
||||||
return x.innerHTML += "" + (+sizeB) + " Bytes";
|
return FileInfo.innerHTML += "" + (+sizeB) + " Bytes";
|
||||||
},
|
},
|
||||||
K: function(x) {
|
K: function() {
|
||||||
var sizeKB;
|
var sizeKB;
|
||||||
sizeKB = Math.round(this.file.sizeInBytes / 1024);
|
sizeKB = Math.round(this.file.sizeInBytes / 1024);
|
||||||
return x.innerHTML += "" + (+sizeKB) + " KB";
|
return FileInfo.innerHTML += "" + (+sizeKB) + " KB";
|
||||||
},
|
},
|
||||||
M: function(x) {
|
M: function() {
|
||||||
var sizeMB;
|
var sizeMB;
|
||||||
sizeMB = Math.round(this.file.sizeInBytes / 1048576 * 100) / 100;
|
sizeMB = Math.round(this.file.sizeInBytes / 1048576 * 100) / 100;
|
||||||
return x.innerHTML += "" + (+sizeMB) + " MB";
|
return FileInfo.innerHTML += "" + (+sizeMB) + " MB";
|
||||||
},
|
},
|
||||||
r: function(x) {
|
r: function() {
|
||||||
var dim;
|
var dim;
|
||||||
dim = this.file.dimensions || 'PDF';
|
dim = this.file.dimensions || 'PDF';
|
||||||
return x.innerHTML += E(dim);
|
return FileInfo.innerHTML += E(dim);
|
||||||
},
|
},
|
||||||
'%': function(x) {
|
'%': function() {
|
||||||
return x.innerHTML += '%';
|
return FileInfo.innerHTML += '%';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -12402,7 +12400,7 @@
|
|||||||
Settings.dialog = dialog = $.el('div', {
|
Settings.dialog = dialog = $.el('div', {
|
||||||
id: 'fourchanx-settings',
|
id: 'fourchanx-settings',
|
||||||
className: 'dialog',
|
className: 'dialog',
|
||||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.2</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.3</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||||
});
|
});
|
||||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||||
@ -13254,7 +13252,7 @@
|
|||||||
}
|
}
|
||||||
if (previousversion) {
|
if (previousversion) {
|
||||||
el = $.el('span', {
|
el = $.el('span', {
|
||||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.2</a>.'
|
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.3</a>.'
|
||||||
});
|
});
|
||||||
new Notice('info', el, 15);
|
new Notice('info', el, 15);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.8.2
|
// @version 1.8.3
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// Generated by CoffeeScript
|
// Generated by CoffeeScript
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name 4chan X
|
// @name 4chan X
|
||||||
// @version 1.8.2
|
// @version 1.8.3
|
||||||
// @minGMVer 1.14
|
// @minGMVer 1.14
|
||||||
// @minFFVer 26
|
// @minFFVer 26
|
||||||
// @namespace 4chan-X
|
// @namespace 4chan-X
|
||||||
@ -24,7 +24,7 @@
|
|||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4chan X - Version 1.8.2 - 2014-06-30
|
* 4chan X - Version 1.8.3 - 2014-07-01
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license.
|
* Licensed under the MIT license.
|
||||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||||
@ -375,7 +375,7 @@
|
|||||||
doc = d.documentElement;
|
doc = d.documentElement;
|
||||||
|
|
||||||
g = {
|
g = {
|
||||||
VERSION: '1.8.2',
|
VERSION: '1.8.3',
|
||||||
NAMESPACE: '4chan X.',
|
NAMESPACE: '4chan X.',
|
||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
@ -1108,7 +1108,7 @@
|
|||||||
size *= 1024;
|
size *= 1024;
|
||||||
}
|
}
|
||||||
this.file.sizeInBytes = size;
|
this.file.sizeInBytes = size;
|
||||||
this.file.thumbURL = that.isArchived ? thumb.src : "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
this.file.thumbURL = "" + location.protocol + "//t.4cdn.org/" + this.board + "/" + (this.file.URL.match(/(\d+)\./)[1]) + "s.jpg";
|
||||||
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
this.file.isImage = /(jpg|png|gif)$/i.test(this.file.URL);
|
||||||
this.file.isVideo = /webm$/i.test(this.file.URL);
|
this.file.isVideo = /webm$/i.test(this.file.URL);
|
||||||
nameNode = $('a', fileText);
|
nameNode = $('a', fileText);
|
||||||
@ -3578,6 +3578,7 @@
|
|||||||
post = new Post(Build.post(o), thread, board, {
|
post = new Post(Build.post(o), thread, board, {
|
||||||
isArchived: true
|
isArchived: true
|
||||||
});
|
});
|
||||||
|
post.file.thumbURL = o.file.turl;
|
||||||
post.isFetchedQuote = true;
|
post.isFetchedQuote = true;
|
||||||
Main.callbackNodes(Post, [post]);
|
Main.callbackNodes(Post, [post]);
|
||||||
return Get.insert(post, root, context);
|
return Get.insert(post, root, context);
|
||||||
@ -11421,84 +11422,81 @@
|
|||||||
return FileInfo.format(Conf['fileInfo'], this, this.file.text.firstElementChild);
|
return FileInfo.format(Conf['fileInfo'], this, this.file.text.firstElementChild);
|
||||||
},
|
},
|
||||||
format: function(formatString, post, outputNode) {
|
format: function(formatString, post, outputNode) {
|
||||||
var output;
|
FileInfo.innerHTML = '';
|
||||||
output = {
|
|
||||||
innerHTML: ''
|
|
||||||
};
|
|
||||||
formatString.replace(/%(.)|[^%]+/g, function(s, c) {
|
formatString.replace(/%(.)|[^%]+/g, function(s, c) {
|
||||||
if (c in FileInfo.formatters) {
|
if (c in FileInfo.formatters) {
|
||||||
FileInfo.formatters[c].call(post, output);
|
FileInfo.formatters[c].call(post);
|
||||||
} else {
|
} else {
|
||||||
output.innerHTML += E(s);
|
FileInfo.innerHTML += E(s);
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
});
|
});
|
||||||
return outputNode.innerHTML = output.innerHTML;
|
return outputNode.innerHTML = FileInfo.innerHTML;
|
||||||
},
|
},
|
||||||
formatters: {
|
formatters: {
|
||||||
t: function(x) {
|
t: function() {
|
||||||
var timestamp;
|
var timestamp;
|
||||||
timestamp = this.file.URL.match(/\d+\..+$/)[0];
|
timestamp = this.file.URL.match(/\d+\..+$/)[0];
|
||||||
return x.innerHTML += E(timestamp);
|
return FileInfo.innerHTML += E(timestamp);
|
||||||
},
|
},
|
||||||
T: function(x) {
|
T: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.t.call(this, x);
|
FileInfo.formatters.t.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
l: function(x) {
|
l: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.n.call(this, x);
|
FileInfo.formatters.n.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
L: function(x) {
|
L: function() {
|
||||||
x.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
FileInfo.innerHTML += "<a href='" + (E(this.file.URL)) + "' target='_blank'>";
|
||||||
FileInfo.formatters.N.call(this, x);
|
FileInfo.formatters.N.call(this);
|
||||||
return x.innerHTML += '</a>';
|
return FileInfo.innerHTML += '</a>';
|
||||||
},
|
},
|
||||||
n: function(x) {
|
n: function() {
|
||||||
var fullname, shortname;
|
var fullname, shortname;
|
||||||
fullname = this.file.name;
|
fullname = this.file.name;
|
||||||
shortname = Build.shortFilename(this.file.name, this.isReply);
|
shortname = Build.shortFilename(this.file.name, this.isReply);
|
||||||
if (fullname === shortname) {
|
if (fullname === shortname) {
|
||||||
return x.innerHTML += E(fullname);
|
return FileInfo.innerHTML += E(fullname);
|
||||||
} else {
|
} else {
|
||||||
return x.innerHTML += "<span class='fnswitch'><span class='fntrunc'>" + (E(shortname)) + "</span><span class='fnfull'>" + (E(fullname)) + "</span></span>";
|
return FileInfo.innerHTML += "<span class='fnswitch'><span class='fntrunc'>" + (E(shortname)) + "</span><span class='fnfull'>" + (E(fullname)) + "</span></span>";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
N: function(x) {
|
N: function() {
|
||||||
return x.innerHTML += E(this.file.name);
|
return FileInfo.innerHTML += E(this.file.name);
|
||||||
},
|
},
|
||||||
p: function(x) {
|
p: function() {
|
||||||
if (this.file.isSpoiler) {
|
if (this.file.isSpoiler) {
|
||||||
return x.innerHTML += 'Spoiler, ';
|
return FileInfo.innerHTML += 'Spoiler, ';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
s: function(x) {
|
s: function() {
|
||||||
return x.innerHTML += E(this.file.size);
|
return FileInfo.innerHTML += E(this.file.size);
|
||||||
},
|
},
|
||||||
B: function(x) {
|
B: function() {
|
||||||
var sizeB;
|
var sizeB;
|
||||||
sizeB = Math.round(this.file.sizeInBytes);
|
sizeB = Math.round(this.file.sizeInBytes);
|
||||||
return x.innerHTML += "" + (+sizeB) + " Bytes";
|
return FileInfo.innerHTML += "" + (+sizeB) + " Bytes";
|
||||||
},
|
},
|
||||||
K: function(x) {
|
K: function() {
|
||||||
var sizeKB;
|
var sizeKB;
|
||||||
sizeKB = Math.round(this.file.sizeInBytes / 1024);
|
sizeKB = Math.round(this.file.sizeInBytes / 1024);
|
||||||
return x.innerHTML += "" + (+sizeKB) + " KB";
|
return FileInfo.innerHTML += "" + (+sizeKB) + " KB";
|
||||||
},
|
},
|
||||||
M: function(x) {
|
M: function() {
|
||||||
var sizeMB;
|
var sizeMB;
|
||||||
sizeMB = Math.round(this.file.sizeInBytes / 1048576 * 100) / 100;
|
sizeMB = Math.round(this.file.sizeInBytes / 1048576 * 100) / 100;
|
||||||
return x.innerHTML += "" + (+sizeMB) + " MB";
|
return FileInfo.innerHTML += "" + (+sizeMB) + " MB";
|
||||||
},
|
},
|
||||||
r: function(x) {
|
r: function() {
|
||||||
var dim;
|
var dim;
|
||||||
dim = this.file.dimensions || 'PDF';
|
dim = this.file.dimensions || 'PDF';
|
||||||
return x.innerHTML += E(dim);
|
return FileInfo.innerHTML += E(dim);
|
||||||
},
|
},
|
||||||
'%': function(x) {
|
'%': function() {
|
||||||
return x.innerHTML += '%';
|
return FileInfo.innerHTML += '%';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -12403,7 +12401,7 @@
|
|||||||
Settings.dialog = dialog = $.el('div', {
|
Settings.dialog = dialog = $.el('div', {
|
||||||
id: 'fourchanx-settings',
|
id: 'fourchanx-settings',
|
||||||
className: 'dialog',
|
className: 'dialog',
|
||||||
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.2</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
innerHTML: '<nav><div class=sections-list></div><p class=\'imp-exp-result warning\'></p><div class=credits><a class=export>Export</a> | <a class=import>Import</a> | <a class=reset>Reset Settings</a> | <input type=file hidden><a href=\'https://github.com/ccd0/4chan-x\' target=_blank>4chan X</a> | <a href=\'https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md\' target=_blank>1.8.3</a> | <a href=\'https://github.com/ccd0/4chan-x/issues\' target=_blank>Issues</a> | <a href=javascript:; class=\'close fa fa-times\' title=Close></a></div></nav><div class=section-container><section></section></div>'
|
||||||
});
|
});
|
||||||
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
$.on($('.export', Settings.dialog), 'click', Settings["export"]);
|
||||||
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
$.on($('.import', Settings.dialog), 'click', Settings["import"]);
|
||||||
@ -13255,7 +13253,7 @@
|
|||||||
}
|
}
|
||||||
if (previousversion) {
|
if (previousversion) {
|
||||||
el = $.el('span', {
|
el = $.el('span', {
|
||||||
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.2</a>.'
|
innerHTML: '4chan X has been updated to <a href="https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md" target="_blank">version 1.8.3</a>.'
|
||||||
});
|
});
|
||||||
new Notice('info', el, 15);
|
new Notice('info', el, 15);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Binary file not shown.
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.8.2' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.8.3' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
|
||||||
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
|
||||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.8.2' />
|
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.8.3' />
|
||||||
</app>
|
</app>
|
||||||
</gupdate>
|
</gupdate>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "4chan-X",
|
"name": "4chan-X",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||||
"meta": {
|
"meta": {
|
||||||
"name": "4chan X",
|
"name": "4chan X",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user