Release 4chan X v1.7.6.
This commit is contained in:
parent
340bbd7220
commit
2889c17e32
@ -1,3 +1,6 @@
|
||||
### v1.7.6
|
||||
*2014-04-10*
|
||||
|
||||
**ccd0**
|
||||
- `Loop in New Tab` (enabled by default) causes videos opened in a separate tab to loop, and applies your settings for inline expanded videos to them.
|
||||
|
||||
|
||||
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 4chan X - Version 1.7.5 - 2014-04-09
|
||||
* 4chan X - Version 1.7.6 - 2014-04-10
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.7.5
|
||||
// @version 1.7.6
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Generated by CoffeeScript
|
||||
// ==UserScript==
|
||||
// @name 4chan X
|
||||
// @version 1.7.5
|
||||
// @version 1.7.6
|
||||
// @minGMVer 1.14
|
||||
// @minFFVer 26
|
||||
// @namespace 4chan-X
|
||||
@ -24,7 +24,7 @@
|
||||
// ==/UserScript==
|
||||
|
||||
/*
|
||||
* 4chan X - Version 1.7.5 - 2014-04-09
|
||||
* 4chan X - Version 1.7.6 - 2014-04-10
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -106,7 +106,7 @@
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
var $, $$, Anonymize, ArchiveLink, AutoGIF, Banner, Board, Build, Callbacks, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DeleteLink, Dice, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Gallery, Get, Header, IDColor, ImageExpand, ImageHover, ImageLoader, Index, InfiniScroll, Keybinds, Linkify, Main, Menu, Nav, Navigate, Notice, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, TrashQueue, UI, Unread, c, d, doc, g,
|
||||
var $, $$, Anonymize, ArchiveLink, AutoGIF, Banner, Board, Build, Callbacks, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DeleteLink, Dice, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Gallery, Get, Header, IDColor, ImageExpand, ImageHover, ImageLoader, Index, InfiniScroll, Keybinds, Linkify, Main, Menu, Nav, Navigate, Notice, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, TrashQueue, UI, Unread, Video, c, d, doc, g,
|
||||
__slice = [].slice,
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
@ -183,9 +183,10 @@
|
||||
'Image Prefetching': [false, 'Preload images'],
|
||||
'Fappe Tyme': [false, 'Hide posts without images. *hint* *hint*'],
|
||||
'Werk Tyme': [false, 'Hide all post images.'],
|
||||
'Autoplay': [true, 'Videos begin playing immediately when opened inline.'],
|
||||
'Show Controls': [true, 'Show native seek and volume controls on videos. Contract videos when dragged to the left.'],
|
||||
'Allow Sound': [true, 'Allow sound in inline videos.']
|
||||
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
|
||||
'Show Controls': [true, 'Show controls on videos expanded inline. Turn this off if you want to contract videos by clicking on them.'],
|
||||
'Allow Sound': [true, 'Allow sound in videos.'],
|
||||
'Loop in New Tab': [true, 'Loop videos opened in their own tabs, and apply settings for inline expanded videos to them.']
|
||||
},
|
||||
'Menu': {
|
||||
'Menu': [true, 'Add a drop-down menu to posts.'],
|
||||
@ -370,7 +371,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.7.5',
|
||||
VERSION: '1.7.6',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -7645,7 +7646,7 @@
|
||||
ImageExpand.setupVideoControls(clone);
|
||||
if (!clone.origin.file.fullImage.paused) {
|
||||
return $.queueTask(function() {
|
||||
return ImageExpand.startVideo(clone);
|
||||
return Video.start(clone.file.fullImage);
|
||||
});
|
||||
}
|
||||
} else if (ImageExpand.on && !this.isHidden && (Conf['Expand spoilers'] || !this.file.isSpoiler) && (Conf['Expand videos'] || !this.file.isVideo)) {
|
||||
@ -7770,9 +7771,6 @@
|
||||
el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), {
|
||||
className: 'full-image'
|
||||
});
|
||||
if (isVideo) {
|
||||
el.loop = true;
|
||||
}
|
||||
$.on(el, 'error', ImageExpand.error);
|
||||
el.src = src || post.file.URL;
|
||||
}
|
||||
@ -7816,11 +7814,7 @@
|
||||
post.file.isExpanded = true;
|
||||
if (post.file.isVideo) {
|
||||
ImageExpand.setupVideoControls(post);
|
||||
post.file.fullImage.muted = !Conf['Allow Sound'];
|
||||
post.file.fullImage.controls = Conf['Show Controls'];
|
||||
if (Conf['Autoplay'] && !disableAutoplay) {
|
||||
return ImageExpand.startVideo(post);
|
||||
}
|
||||
return Video.configure(post.file.fullImage, disableAutoplay);
|
||||
}
|
||||
},
|
||||
videoCB: {
|
||||
@ -7877,23 +7871,6 @@
|
||||
}
|
||||
return $.add(file.text, file.videoControls);
|
||||
},
|
||||
startVideo: function(post) {
|
||||
var controls, file, video;
|
||||
file = post.file;
|
||||
video = file.fullImage;
|
||||
controls = video.controls;
|
||||
video.controls = false;
|
||||
video.play();
|
||||
if (controls) {
|
||||
return $.asap((function() {
|
||||
return (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || !file.isExpanded;
|
||||
}), function() {
|
||||
if (file.isExpanded) {
|
||||
return video.controls = true;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
var URL, post, src, timeoutID;
|
||||
post = Get.postFromNode(this);
|
||||
@ -8275,6 +8252,33 @@
|
||||
}
|
||||
};
|
||||
|
||||
Video = {
|
||||
configure: function(video, disableAutoplay) {
|
||||
video.loop = true;
|
||||
video.muted = !Conf['Allow Sound'];
|
||||
video.controls = Conf['Show Controls'];
|
||||
video.autoplay = false;
|
||||
if (Conf['Autoplay'] && !disableAutoplay) {
|
||||
return Video.start(video);
|
||||
} else {
|
||||
return video.pause();
|
||||
}
|
||||
},
|
||||
start: function(video) {
|
||||
var controls;
|
||||
controls = video.controls;
|
||||
video.controls = false;
|
||||
video.play();
|
||||
if (controls) {
|
||||
return $.asap((function() {
|
||||
return (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || !d.contains(video);
|
||||
}), function() {
|
||||
return video.controls = true;
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Linkify = {
|
||||
init: function() {
|
||||
var type, _i, _len, _ref;
|
||||
@ -13325,7 +13329,7 @@
|
||||
return $.on(d, '4chanMainInit', Main.initStyle);
|
||||
},
|
||||
initFeatures: function() {
|
||||
var err, feature, name, _i, _len, _ref, _ref1;
|
||||
var err, feature, name, video, _i, _len, _ref, _ref1;
|
||||
switch (location.hostname) {
|
||||
case 'a.4cdn.org':
|
||||
return;
|
||||
@ -13333,6 +13337,18 @@
|
||||
Report.init();
|
||||
return;
|
||||
case 'i.4cdn.org':
|
||||
if (Conf['Loop in New Tab'] && (video = $('video'))) {
|
||||
Video.configure(video);
|
||||
$.on(video, 'click', function() {
|
||||
if (!video.controls) {
|
||||
if (video.paused) {
|
||||
return video.play();
|
||||
} else {
|
||||
return video.pause();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$.ready(function() {
|
||||
var URL, pathname, _ref;
|
||||
if (Conf['404 Redirect'] && ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found')) {
|
||||
|
||||
BIN
builds/crx.crx
BIN
builds/crx.crx
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "4chan X",
|
||||
"version": "1.7.5",
|
||||
"version": "1.7.6",
|
||||
"manifest_version": 2,
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"icons": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// Generated by CoffeeScript
|
||||
/*
|
||||
* 4chan X - Version 1.7.5 - 2014-04-09
|
||||
* 4chan X - Version 1.7.6 - 2014-04-10
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* https://github.com/ccd0/4chan-x/blob/master/LICENSE
|
||||
@ -82,7 +82,7 @@
|
||||
'use strict';
|
||||
|
||||
(function() {
|
||||
var $, $$, Anonymize, ArchiveLink, AutoGIF, Banner, Board, Build, Callbacks, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DeleteLink, Dice, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Gallery, Get, Header, IDColor, ImageExpand, ImageHover, ImageLoader, Index, InfiniScroll, Keybinds, Linkify, Main, Menu, Nav, Navigate, Notice, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, TrashQueue, UI, Unread, c, d, doc, g,
|
||||
var $, $$, Anonymize, ArchiveLink, AutoGIF, Banner, Board, Build, Callbacks, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DeleteLink, Dice, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Gallery, Get, Header, IDColor, ImageExpand, ImageHover, ImageLoader, Index, InfiniScroll, Keybinds, Linkify, Main, Menu, Nav, Navigate, Notice, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, RandomAccessList, Recursive, Redirect, RelativeDates, RemoveSpoilers, Report, ReportLink, RevealSpoilers, Sauce, Settings, SimpleDict, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, TrashQueue, UI, Unread, Video, c, d, doc, g,
|
||||
__slice = [].slice,
|
||||
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
|
||||
__hasProp = {}.hasOwnProperty,
|
||||
@ -159,9 +159,10 @@
|
||||
'Image Prefetching': [false, 'Preload images'],
|
||||
'Fappe Tyme': [false, 'Hide posts without images. *hint* *hint*'],
|
||||
'Werk Tyme': [false, 'Hide all post images.'],
|
||||
'Autoplay': [true, 'Videos begin playing immediately when opened inline.'],
|
||||
'Show Controls': [true, 'Show native seek and volume controls on videos. Contract videos when dragged to the left.'],
|
||||
'Allow Sound': [true, 'Allow sound in inline videos.']
|
||||
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
|
||||
'Show Controls': [true, 'Show controls on videos expanded inline. Turn this off if you want to contract videos by clicking on them.'],
|
||||
'Allow Sound': [true, 'Allow sound in videos.'],
|
||||
'Loop in New Tab': [true, 'Loop videos opened in their own tabs, and apply settings for inline expanded videos to them.']
|
||||
},
|
||||
'Menu': {
|
||||
'Menu': [true, 'Add a drop-down menu to posts.'],
|
||||
@ -346,7 +347,7 @@
|
||||
doc = d.documentElement;
|
||||
|
||||
g = {
|
||||
VERSION: '1.7.5',
|
||||
VERSION: '1.7.6',
|
||||
NAMESPACE: '4chan X.',
|
||||
boards: {}
|
||||
};
|
||||
@ -7664,7 +7665,7 @@
|
||||
ImageExpand.setupVideoControls(clone);
|
||||
if (!clone.origin.file.fullImage.paused) {
|
||||
return $.queueTask(function() {
|
||||
return ImageExpand.startVideo(clone);
|
||||
return Video.start(clone.file.fullImage);
|
||||
});
|
||||
}
|
||||
} else if (ImageExpand.on && !this.isHidden && (Conf['Expand spoilers'] || !this.file.isSpoiler) && (Conf['Expand videos'] || !this.file.isVideo)) {
|
||||
@ -7789,9 +7790,6 @@
|
||||
el = post.file.fullImage = $.el((isVideo ? 'video' : 'img'), {
|
||||
className: 'full-image'
|
||||
});
|
||||
if (isVideo) {
|
||||
el.loop = true;
|
||||
}
|
||||
$.on(el, 'error', ImageExpand.error);
|
||||
el.src = src || post.file.URL;
|
||||
}
|
||||
@ -7835,11 +7833,7 @@
|
||||
post.file.isExpanded = true;
|
||||
if (post.file.isVideo) {
|
||||
ImageExpand.setupVideoControls(post);
|
||||
post.file.fullImage.muted = !Conf['Allow Sound'];
|
||||
post.file.fullImage.controls = Conf['Show Controls'];
|
||||
if (Conf['Autoplay'] && !disableAutoplay) {
|
||||
return ImageExpand.startVideo(post);
|
||||
}
|
||||
return Video.configure(post.file.fullImage, disableAutoplay);
|
||||
}
|
||||
},
|
||||
videoCB: {
|
||||
@ -7896,23 +7890,6 @@
|
||||
}
|
||||
return $.add(file.text, file.videoControls);
|
||||
},
|
||||
startVideo: function(post) {
|
||||
var controls, file, video;
|
||||
file = post.file;
|
||||
video = file.fullImage;
|
||||
controls = video.controls;
|
||||
video.controls = false;
|
||||
video.play();
|
||||
if (controls) {
|
||||
return $.asap((function() {
|
||||
return (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || !file.isExpanded;
|
||||
}), function() {
|
||||
if (file.isExpanded) {
|
||||
return video.controls = true;
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
var URL, post, src, timeoutID;
|
||||
post = Get.postFromNode(this);
|
||||
@ -8272,6 +8249,33 @@
|
||||
}
|
||||
};
|
||||
|
||||
Video = {
|
||||
configure: function(video, disableAutoplay) {
|
||||
video.loop = true;
|
||||
video.muted = !Conf['Allow Sound'];
|
||||
video.controls = Conf['Show Controls'];
|
||||
video.autoplay = false;
|
||||
if (Conf['Autoplay'] && !disableAutoplay) {
|
||||
return Video.start(video);
|
||||
} else {
|
||||
return video.pause();
|
||||
}
|
||||
},
|
||||
start: function(video) {
|
||||
var controls;
|
||||
controls = video.controls;
|
||||
video.controls = false;
|
||||
video.play();
|
||||
if (controls) {
|
||||
return $.asap((function() {
|
||||
return (video.readyState >= 3 && video.currentTime <= Math.max(0.1, video.duration - 0.5)) || !d.contains(video);
|
||||
}), function() {
|
||||
return video.controls = true;
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Linkify = {
|
||||
init: function() {
|
||||
var type, _i, _len, _ref;
|
||||
@ -13325,7 +13329,7 @@
|
||||
return $.on(d, '4chanMainInit', Main.initStyle);
|
||||
},
|
||||
initFeatures: function() {
|
||||
var err, feature, name, _i, _len, _ref, _ref1;
|
||||
var err, feature, name, video, _i, _len, _ref, _ref1;
|
||||
switch (location.hostname) {
|
||||
case 'a.4cdn.org':
|
||||
return;
|
||||
@ -13333,6 +13337,18 @@
|
||||
Report.init();
|
||||
return;
|
||||
case 'i.4cdn.org':
|
||||
if (Conf['Loop in New Tab'] && (video = $('video'))) {
|
||||
Video.configure(video);
|
||||
$.on(video, 'click', function() {
|
||||
if (!video.controls) {
|
||||
if (video.paused) {
|
||||
return video.play();
|
||||
} else {
|
||||
return video.pause();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
$.ready(function() {
|
||||
var URL, pathname, _ref;
|
||||
if (Conf['404 Redirect'] && ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found')) {
|
||||
|
||||
@ -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/crx.crx' version='1.7.5' />
|
||||
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/crx.crx' version='1.7.6' />
|
||||
</app>
|
||||
</gupdate>
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "4chan-X",
|
||||
"version": "1.7.5",
|
||||
"version": "1.7.6",
|
||||
"description": "Cross-browser userscript for maximum lurking on 4chan.",
|
||||
"meta": {
|
||||
"name": "4chan X",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user