Release 4chan X v1.9.23.6.

This commit is contained in:
ccd0 2015-02-04 01:45:40 -08:00
parent b74cf487f6
commit 928955021f
14 changed files with 131 additions and 150 deletions

View File

@ -3,6 +3,11 @@ Sometimes the changelog has notes (not comprehensive) acknowledging people's wor
The links to individual versions below are to copies of the script with the update URL removed. If you want automatic updates, install the script from the links on the [main page](https://github.com/ccd0/4chan-x).
<!-- v1.9.23.x -->
### v1.9.23.6
*2015-02-04* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.6/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.6/builds/4chan-X-noupdate.crx "Chromium version")]
- Mute videos when removing them to work around a bug where the sound kept playing for some videos.
### v1.9.23.5
*2015-02-03* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.5/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.23.5/builds/4chan-X-noupdate.crx "Chromium version")]

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.9.23.5
* 4chan X - Version 1.9.23.6
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
// @version 1.9.23.5
// @version 1.9.23.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X beta
// @version 1.9.23.5
// @version 1.9.23.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -25,7 +25,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.9.23.5
* 4chan X - Version 1.9.23.6
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -402,7 +402,7 @@
doc = d.documentElement;
g = {
VERSION: '1.9.23.5',
VERSION: '1.9.23.6',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -9066,7 +9066,7 @@
return $.add(Gallery.nodes.thumbs, thumb);
},
open: function(thumb) {
var el, elType, file, name, newID, nodes, oldID, post, slideshow, _base, _ref;
var el, elType, file, name, newID, nodes, oldID, post, slideshow, _ref;
nodes = Gallery.nodes;
name = nodes.name;
oldID = +nodes.current.dataset.id;
@ -9081,18 +9081,11 @@
file = $.el(elType, {
title: name.download = name.textContent = thumb.title
});
$.on(file, 'error', (function(_this) {
return function() {
return Gallery.error(file, thumb);
};
})(this));
file.src = name.href = thumb.href;
$.extend(file.dataset, thumb.dataset);
if (!nodes.current.error) {
if (typeof (_base = nodes.current).pause === "function") {
_base.pause();
}
}
$.on(file, 'error', Gallery.error);
file.src = name.href = thumb.href;
$.off(nodes.current, 'error', Gallery.error);
ImageCommon.pause(nodes.current);
$.replace(nodes.current, file);
if (elType === 'video') {
file.loop = true;
@ -9118,23 +9111,25 @@
}
return nodes.thumbs.scrollTop = thumb.offsetTop + thumb.offsetHeight / 2 - nodes.thumbs.clientHeight / 2;
},
error: function(file, thumb) {
error: function() {
var _ref;
if (((_ref = file.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
if (((_ref = this.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
return new Notice('error', 'Corrupt or unplayable video', 30);
}
if (file.src.split('/')[2] !== 'i.4cdn.org') {
if (this.src.split('/')[2] !== 'i.4cdn.org') {
return;
}
return ImageCommon.error(file, g.posts[file.dataset.post], null, function(URL) {
if (!URL) {
return;
}
thumb.href = URL;
if (Gallery.nodes.current === file) {
return file.src = URL;
}
});
return ImageCommon.error(this, g.posts[this.dataset.post], null, (function(_this) {
return function(url) {
if (!url) {
return;
}
Gallery.images[_this.dataset.id].href = url;
if (Gallery.nodes.current === _this) {
return _this.src = url;
}
};
})(this));
},
cleanupTimer: function() {
var current;
@ -9272,10 +9267,8 @@
return Gallery.slideshow = false;
},
close: function() {
var _base;
if (typeof (_base = Gallery.nodes.current).pause === "function") {
_base.pause();
}
$.off(Gallery.nodes.current, 'error', Gallery.error);
ImageCommon.pause(Gallery.nodes.current);
$.rm(Gallery.nodes.el);
$.rmClass(doc, 'gallery-open');
if (Conf['Fullscreen Gallery']) {
@ -9360,6 +9353,14 @@
};
ImageCommon = {
pause: function(video) {
if (video.nodeName !== 'VIDEO') {
return;
}
video.pause();
$.off(video, 'volumechange', Volume.change);
return video.muted = true;
},
rewind: function(el) {
if (el.nodeName === 'VIDEO') {
if (el.readyState >= el.HAVE_METADATA) {
@ -9671,7 +9672,7 @@
$.off(el, 'error', ImageExpand.error);
ImageCommon.pushCache(el);
if (file.isVideo) {
el.pause();
ImageCommon.pause(el);
_ref1 = ImageExpand.videoCB;
for (eventName in _ref1) {
cb = _ref1[eventName];
@ -9694,7 +9695,7 @@
});
},
expand: function(post, src) {
var el, file, isNew, isVideo, thumb, _ref;
var el, file, isVideo, thumb, _ref;
file = post.file;
thumb = file.thumb, isVideo = file.isVideo;
if (post.isHidden || file.isExpanding || file.isExpanded) {
@ -9712,7 +9713,6 @@
}
el.removeAttribute('id');
} else {
isNew = true;
el = file.fullImage = $.el((isVideo ? 'video' : 'img'));
el.dataset.fullID = post.fullID;
$.on(el, 'error', ImageExpand.error);
@ -9728,7 +9728,7 @@
thumb.parentNode.removeAttribute('href');
thumb.parentNode.removeAttribute('target');
el.loop = true;
Volume.setup(el, isNew);
Volume.setup(el);
ImageExpand.setupVideoCB(post);
}
if (!isVideo) {
@ -9934,7 +9934,7 @@
},
mouseover: function(post) {
return function(e) {
var el, error, file, height, isNew, isVideo, left, maxHeight, maxWidth, padding, right, scale, width, x, _ref, _ref1, _ref2;
var el, error, file, height, isVideo, left, maxHeight, maxWidth, padding, right, scale, width, x, _ref, _ref1, _ref2;
if (!doc.contains(this)) {
return;
}
@ -9948,7 +9948,6 @@
el = ImageCommon.popCache();
$.on(el, 'error', error);
} else {
isNew = true;
el = $.el((isVideo ? 'video' : 'img'));
el.dataset.fullID = post.fullID;
$.on(el, 'error', error);
@ -9963,7 +9962,7 @@
if (isVideo) {
el.loop = true;
el.controls = false;
Volume.setup(el, isNew);
Volume.setup(el);
if (Conf['Autoplay']) {
el.play();
}
@ -9998,9 +9997,7 @@
cb: function() {
$.off(el, 'error', error);
ImageCommon.pushCache(el);
if (isVideo) {
el.pause();
}
ImageCommon.pause(el);
$.rm(el);
return el.removeAttribute('style');
}
@ -10440,15 +10437,10 @@
order: 201
});
},
setup: function(video, isNew) {
if (isNew == null) {
isNew = true;
}
setup: function(video) {
video.muted = !Conf['Allow Sound'];
video.volume = Conf['Default Volume'];
if (isNew) {
return $.on(video, 'volumechange', Volume.change);
}
return $.on(video, 'volumechange', Volume.change);
},
change: function() {
var items, muted, volume;

Binary file not shown.

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.9.23.5
// @version 1.9.23.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -24,7 +24,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.9.23.5
* 4chan X - Version 1.9.23.6
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -401,7 +401,7 @@
doc = d.documentElement;
g = {
VERSION: '1.9.23.5',
VERSION: '1.9.23.6',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -9065,7 +9065,7 @@
return $.add(Gallery.nodes.thumbs, thumb);
},
open: function(thumb) {
var el, elType, file, name, newID, nodes, oldID, post, slideshow, _base, _ref;
var el, elType, file, name, newID, nodes, oldID, post, slideshow, _ref;
nodes = Gallery.nodes;
name = nodes.name;
oldID = +nodes.current.dataset.id;
@ -9080,18 +9080,11 @@
file = $.el(elType, {
title: name.download = name.textContent = thumb.title
});
$.on(file, 'error', (function(_this) {
return function() {
return Gallery.error(file, thumb);
};
})(this));
file.src = name.href = thumb.href;
$.extend(file.dataset, thumb.dataset);
if (!nodes.current.error) {
if (typeof (_base = nodes.current).pause === "function") {
_base.pause();
}
}
$.on(file, 'error', Gallery.error);
file.src = name.href = thumb.href;
$.off(nodes.current, 'error', Gallery.error);
ImageCommon.pause(nodes.current);
$.replace(nodes.current, file);
if (elType === 'video') {
file.loop = true;
@ -9117,23 +9110,25 @@
}
return nodes.thumbs.scrollTop = thumb.offsetTop + thumb.offsetHeight / 2 - nodes.thumbs.clientHeight / 2;
},
error: function(file, thumb) {
error: function() {
var _ref;
if (((_ref = file.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
if (((_ref = this.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
return new Notice('error', 'Corrupt or unplayable video', 30);
}
if (file.src.split('/')[2] !== 'i.4cdn.org') {
if (this.src.split('/')[2] !== 'i.4cdn.org') {
return;
}
return ImageCommon.error(file, g.posts[file.dataset.post], null, function(URL) {
if (!URL) {
return;
}
thumb.href = URL;
if (Gallery.nodes.current === file) {
return file.src = URL;
}
});
return ImageCommon.error(this, g.posts[this.dataset.post], null, (function(_this) {
return function(url) {
if (!url) {
return;
}
Gallery.images[_this.dataset.id].href = url;
if (Gallery.nodes.current === _this) {
return _this.src = url;
}
};
})(this));
},
cleanupTimer: function() {
var current;
@ -9271,10 +9266,8 @@
return Gallery.slideshow = false;
},
close: function() {
var _base;
if (typeof (_base = Gallery.nodes.current).pause === "function") {
_base.pause();
}
$.off(Gallery.nodes.current, 'error', Gallery.error);
ImageCommon.pause(Gallery.nodes.current);
$.rm(Gallery.nodes.el);
$.rmClass(doc, 'gallery-open');
if (Conf['Fullscreen Gallery']) {
@ -9359,6 +9352,14 @@
};
ImageCommon = {
pause: function(video) {
if (video.nodeName !== 'VIDEO') {
return;
}
video.pause();
$.off(video, 'volumechange', Volume.change);
return video.muted = true;
},
rewind: function(el) {
if (el.nodeName === 'VIDEO') {
if (el.readyState >= el.HAVE_METADATA) {
@ -9670,7 +9671,7 @@
$.off(el, 'error', ImageExpand.error);
ImageCommon.pushCache(el);
if (file.isVideo) {
el.pause();
ImageCommon.pause(el);
_ref1 = ImageExpand.videoCB;
for (eventName in _ref1) {
cb = _ref1[eventName];
@ -9693,7 +9694,7 @@
});
},
expand: function(post, src) {
var el, file, isNew, isVideo, thumb, _ref;
var el, file, isVideo, thumb, _ref;
file = post.file;
thumb = file.thumb, isVideo = file.isVideo;
if (post.isHidden || file.isExpanding || file.isExpanded) {
@ -9711,7 +9712,6 @@
}
el.removeAttribute('id');
} else {
isNew = true;
el = file.fullImage = $.el((isVideo ? 'video' : 'img'));
el.dataset.fullID = post.fullID;
$.on(el, 'error', ImageExpand.error);
@ -9727,7 +9727,7 @@
thumb.parentNode.removeAttribute('href');
thumb.parentNode.removeAttribute('target');
el.loop = true;
Volume.setup(el, isNew);
Volume.setup(el);
ImageExpand.setupVideoCB(post);
}
if (!isVideo) {
@ -9933,7 +9933,7 @@
},
mouseover: function(post) {
return function(e) {
var el, error, file, height, isNew, isVideo, left, maxHeight, maxWidth, padding, right, scale, width, x, _ref, _ref1, _ref2;
var el, error, file, height, isVideo, left, maxHeight, maxWidth, padding, right, scale, width, x, _ref, _ref1, _ref2;
if (!doc.contains(this)) {
return;
}
@ -9947,7 +9947,6 @@
el = ImageCommon.popCache();
$.on(el, 'error', error);
} else {
isNew = true;
el = $.el((isVideo ? 'video' : 'img'));
el.dataset.fullID = post.fullID;
$.on(el, 'error', error);
@ -9962,7 +9961,7 @@
if (isVideo) {
el.loop = true;
el.controls = false;
Volume.setup(el, isNew);
Volume.setup(el);
if (Conf['Autoplay']) {
el.play();
}
@ -9997,9 +9996,7 @@
cb: function() {
$.off(el, 'error', error);
ImageCommon.pushCache(el);
if (isVideo) {
el.pause();
}
ImageCommon.pause(el);
$.rm(el);
return el.removeAttribute('style');
}
@ -10439,15 +10436,10 @@
order: 201
});
},
setup: function(video, isNew) {
if (isNew == null) {
isNew = true;
}
setup: function(video) {
video.muted = !Conf['Allow Sound'];
video.volume = Conf['Default Volume'];
if (isNew) {
return $.on(video, 'volumechange', Volume.change);
}
return $.on(video, 'volumechange', Volume.change);
},
change: function() {
var items, muted, volume;

Binary file not shown.

View File

@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
// @version 1.9.23.5
// @version 1.9.23.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X

View File

@ -1,7 +1,7 @@
// Generated by CoffeeScript
// ==UserScript==
// @name 4chan X
// @version 1.9.23.5
// @version 1.9.23.6
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@ -25,7 +25,7 @@
// ==/UserScript==
/*
* 4chan X - Version 1.9.23.5
* 4chan X - Version 1.9.23.6
*
* Licensed under the MIT license.
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
@ -402,7 +402,7 @@
doc = d.documentElement;
g = {
VERSION: '1.9.23.5',
VERSION: '1.9.23.6',
NAMESPACE: '4chan X.',
NAME: '4chan X',
FAQ: 'https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions',
@ -9066,7 +9066,7 @@
return $.add(Gallery.nodes.thumbs, thumb);
},
open: function(thumb) {
var el, elType, file, name, newID, nodes, oldID, post, slideshow, _base, _ref;
var el, elType, file, name, newID, nodes, oldID, post, slideshow, _ref;
nodes = Gallery.nodes;
name = nodes.name;
oldID = +nodes.current.dataset.id;
@ -9081,18 +9081,11 @@
file = $.el(elType, {
title: name.download = name.textContent = thumb.title
});
$.on(file, 'error', (function(_this) {
return function() {
return Gallery.error(file, thumb);
};
})(this));
file.src = name.href = thumb.href;
$.extend(file.dataset, thumb.dataset);
if (!nodes.current.error) {
if (typeof (_base = nodes.current).pause === "function") {
_base.pause();
}
}
$.on(file, 'error', Gallery.error);
file.src = name.href = thumb.href;
$.off(nodes.current, 'error', Gallery.error);
ImageCommon.pause(nodes.current);
$.replace(nodes.current, file);
if (elType === 'video') {
file.loop = true;
@ -9118,23 +9111,25 @@
}
return nodes.thumbs.scrollTop = thumb.offsetTop + thumb.offsetHeight / 2 - nodes.thumbs.clientHeight / 2;
},
error: function(file, thumb) {
error: function() {
var _ref;
if (((_ref = file.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
if (((_ref = this.error) != null ? _ref.code : void 0) === MediaError.MEDIA_ERR_DECODE) {
return new Notice('error', 'Corrupt or unplayable video', 30);
}
if (file.src.split('/')[2] !== 'i.4cdn.org') {
if (this.src.split('/')[2] !== 'i.4cdn.org') {
return;
}
return ImageCommon.error(file, g.posts[file.dataset.post], null, function(URL) {
if (!URL) {
return;
}
thumb.href = URL;
if (Gallery.nodes.current === file) {
return file.src = URL;
}
});
return ImageCommon.error(this, g.posts[this.dataset.post], null, (function(_this) {
return function(url) {
if (!url) {
return;
}
Gallery.images[_this.dataset.id].href = url;
if (Gallery.nodes.current === _this) {
return _this.src = url;
}
};
})(this));
},
cleanupTimer: function() {
var current;
@ -9272,10 +9267,8 @@
return Gallery.slideshow = false;
},
close: function() {
var _base;
if (typeof (_base = Gallery.nodes.current).pause === "function") {
_base.pause();
}
$.off(Gallery.nodes.current, 'error', Gallery.error);
ImageCommon.pause(Gallery.nodes.current);
$.rm(Gallery.nodes.el);
$.rmClass(doc, 'gallery-open');
if (Conf['Fullscreen Gallery']) {
@ -9360,6 +9353,14 @@
};
ImageCommon = {
pause: function(video) {
if (video.nodeName !== 'VIDEO') {
return;
}
video.pause();
$.off(video, 'volumechange', Volume.change);
return video.muted = true;
},
rewind: function(el) {
if (el.nodeName === 'VIDEO') {
if (el.readyState >= el.HAVE_METADATA) {
@ -9671,7 +9672,7 @@
$.off(el, 'error', ImageExpand.error);
ImageCommon.pushCache(el);
if (file.isVideo) {
el.pause();
ImageCommon.pause(el);
_ref1 = ImageExpand.videoCB;
for (eventName in _ref1) {
cb = _ref1[eventName];
@ -9694,7 +9695,7 @@
});
},
expand: function(post, src) {
var el, file, isNew, isVideo, thumb, _ref;
var el, file, isVideo, thumb, _ref;
file = post.file;
thumb = file.thumb, isVideo = file.isVideo;
if (post.isHidden || file.isExpanding || file.isExpanded) {
@ -9712,7 +9713,6 @@
}
el.removeAttribute('id');
} else {
isNew = true;
el = file.fullImage = $.el((isVideo ? 'video' : 'img'));
el.dataset.fullID = post.fullID;
$.on(el, 'error', ImageExpand.error);
@ -9728,7 +9728,7 @@
thumb.parentNode.removeAttribute('href');
thumb.parentNode.removeAttribute('target');
el.loop = true;
Volume.setup(el, isNew);
Volume.setup(el);
ImageExpand.setupVideoCB(post);
}
if (!isVideo) {
@ -9934,7 +9934,7 @@
},
mouseover: function(post) {
return function(e) {
var el, error, file, height, isNew, isVideo, left, maxHeight, maxWidth, padding, right, scale, width, x, _ref, _ref1, _ref2;
var el, error, file, height, isVideo, left, maxHeight, maxWidth, padding, right, scale, width, x, _ref, _ref1, _ref2;
if (!doc.contains(this)) {
return;
}
@ -9948,7 +9948,6 @@
el = ImageCommon.popCache();
$.on(el, 'error', error);
} else {
isNew = true;
el = $.el((isVideo ? 'video' : 'img'));
el.dataset.fullID = post.fullID;
$.on(el, 'error', error);
@ -9963,7 +9962,7 @@
if (isVideo) {
el.loop = true;
el.controls = false;
Volume.setup(el, isNew);
Volume.setup(el);
if (Conf['Autoplay']) {
el.play();
}
@ -9998,9 +9997,7 @@
cb: function() {
$.off(el, 'error', error);
ImageCommon.pushCache(el);
if (isVideo) {
el.pause();
}
ImageCommon.pause(el);
$.rm(el);
return el.removeAttribute('style');
}
@ -10440,15 +10437,10 @@
order: 201
});
},
setup: function(video, isNew) {
if (isNew == null) {
isNew = true;
}
setup: function(video) {
video.muted = !Conf['Allow Sound'];
video.volume = Conf['Default Volume'];
if (isNew) {
return $.on(video, 'volumechange', Volume.change);
}
return $.on(video, 'volumechange', Volume.change);
},
change: function() {
var items, muted, volume;

Binary file not shown.

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.23.5' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.23.6' />
</app>
</gupdate>

View File

@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
<app appid='lacclbnghgdicfifcamcmcnilckjamag'>
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.23.5' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.23.6' />
</app>
</gupdate>

View File

@ -3,7 +3,7 @@
"description": "Cross-browser userscript for maximum lurking on 4chan.",
"meta": {
"name": "4chan X",
"version": "1.9.23.5",
"version": "1.9.23.6",
"repo": "https://github.com/ccd0/4chan-x/",
"page": "https://github.com/ccd0/4chan-x",
"downloads": "https://ccd0.github.io/4chan-x/builds/",