diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44c6ba3d0..c0b5b4d5f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
## v1.12.0
+**v1.12.0.8** *(2016-07-07)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.8/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.8/builds/4chan-X-noupdate.crx)]
+- Restore `Restart when Opened` option.
+
**v1.12.0.7** *(2016-07-06)* - [[Userscript](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.7/builds/4chan-X-noupdate.user.js)] [[Chrome extension](https://raw.githubusercontent.com/ccd0/4chan-x/1.12.0.7/builds/4chan-X-noupdate.crx)]
- Restore `Open Post in New Tab` option.
diff --git a/builds/4chan-X-beta.crx b/builds/4chan-X-beta.crx
index e87e3c0cf..3a01d63c5 100644
Binary files a/builds/4chan-X-beta.crx and b/builds/4chan-X-beta.crx differ
diff --git a/builds/4chan-X-beta.meta.js b/builds/4chan-X-beta.meta.js
index a4be9d91a..149b30c9d 100644
--- a/builds/4chan-X-beta.meta.js
+++ b/builds/4chan-X-beta.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.12.0.7
+// @version 1.12.0.8
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X-beta.user.js b/builds/4chan-X-beta.user.js
index 452f4b8d4..99b43acfa 100644
--- a/builds/4chan-X-beta.user.js
+++ b/builds/4chan-X-beta.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X beta
-// @version 1.12.0.7
+// @version 1.12.0.8
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -136,7 +136,7 @@ docSet = function() {
};
g = {
- VERSION: '1.12.0.7',
+ VERSION: '1.12.0.8',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -244,6 +244,7 @@ Config = (function() {
'Fappe Tyme': [true, 'Hide posts without images when header menu item is checked. *hint* *hint*'],
'Werk Tyme': [true, 'Hide all post images when header menu item is checked.'],
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
+ 'Restart when Opened': [false, 'Restart GIFs and WebMs when you hover over or expand them.'],
'Show Controls': [true, 'Show controls on videos expanded inline.'],
'Click Passthrough': [false, 'Clicks on videos trigger your browser\'s default behavior. Videos can be contracted with button / dragging to the left.', 1],
'Allow Sound': [true, 'Open videos with the sound unmuted.'],
@@ -11685,6 +11686,17 @@ ImageCommon = (function() {
$.off(video, 'volumechange', Volume.change);
return video.muted = true;
},
+ rewind: function(el) {
+ if (el.nodeName === 'VIDEO') {
+ if (el.readyState >= el.HAVE_METADATA) {
+ return el.currentTime = 0;
+ }
+ } else if (/\.gif$/.test(el.src)) {
+ return $.queueTask(function() {
+ return el.src = el.src;
+ });
+ }
+ },
pushCache: function(el) {
ImageCommon.cache = el;
return $.on(el, 'error', ImageCommon.cacheError);
@@ -12005,6 +12017,9 @@ ImageExpand = (function() {
$.off(el, eventName, cb);
}
}
+ if (Conf['Restart when Opened']) {
+ ImageCommon.rewind(file.thumb);
+ }
delete file.fullImage;
return $.queueTask(function() {
if (file.isExpanding || file.isExpanded) {
@@ -12031,6 +12046,9 @@ ImageExpand = (function() {
} else if (((ref = ImageCommon.cache) != null ? ref.dataset.fullID : void 0) === post.fullID) {
el = file.fullImage = ImageCommon.popCache();
$.on(el, 'error', ImageExpand.error);
+ if (Conf['Restart when Opened'] && el.id !== 'ihover') {
+ ImageCommon.rewind(el);
+ }
el.removeAttribute('id');
} else {
el = file.fullImage = $.el((isVideo ? 'video' : 'img'));
@@ -12274,6 +12292,10 @@ ImageHover = (function() {
$.on(el, 'error', error);
el.src = file.url;
}
+ if (Conf['Restart when Opened']) {
+ ImageCommon.rewind(el);
+ ImageCommon.rewind(this);
+ }
el.id = 'ihover';
$.add(Header.hover, el);
if (isVideo) {
diff --git a/builds/4chan-X-noupdate.crx b/builds/4chan-X-noupdate.crx
index a18c3fc71..883cf9497 100644
Binary files a/builds/4chan-X-noupdate.crx and b/builds/4chan-X-noupdate.crx differ
diff --git a/builds/4chan-X-noupdate.user.js b/builds/4chan-X-noupdate.user.js
index b6b990f4b..bd7a89d2e 100644
--- a/builds/4chan-X-noupdate.user.js
+++ b/builds/4chan-X-noupdate.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.12.0.7
+// @version 1.12.0.8
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -136,7 +136,7 @@ docSet = function() {
};
g = {
- VERSION: '1.12.0.7',
+ VERSION: '1.12.0.8',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -244,6 +244,7 @@ Config = (function() {
'Fappe Tyme': [true, 'Hide posts without images when header menu item is checked. *hint* *hint*'],
'Werk Tyme': [true, 'Hide all post images when header menu item is checked.'],
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
+ 'Restart when Opened': [false, 'Restart GIFs and WebMs when you hover over or expand them.'],
'Show Controls': [true, 'Show controls on videos expanded inline.'],
'Click Passthrough': [false, 'Clicks on videos trigger your browser\'s default behavior. Videos can be contracted with button / dragging to the left.', 1],
'Allow Sound': [true, 'Open videos with the sound unmuted.'],
@@ -11685,6 +11686,17 @@ ImageCommon = (function() {
$.off(video, 'volumechange', Volume.change);
return video.muted = true;
},
+ rewind: function(el) {
+ if (el.nodeName === 'VIDEO') {
+ if (el.readyState >= el.HAVE_METADATA) {
+ return el.currentTime = 0;
+ }
+ } else if (/\.gif$/.test(el.src)) {
+ return $.queueTask(function() {
+ return el.src = el.src;
+ });
+ }
+ },
pushCache: function(el) {
ImageCommon.cache = el;
return $.on(el, 'error', ImageCommon.cacheError);
@@ -12005,6 +12017,9 @@ ImageExpand = (function() {
$.off(el, eventName, cb);
}
}
+ if (Conf['Restart when Opened']) {
+ ImageCommon.rewind(file.thumb);
+ }
delete file.fullImage;
return $.queueTask(function() {
if (file.isExpanding || file.isExpanded) {
@@ -12031,6 +12046,9 @@ ImageExpand = (function() {
} else if (((ref = ImageCommon.cache) != null ? ref.dataset.fullID : void 0) === post.fullID) {
el = file.fullImage = ImageCommon.popCache();
$.on(el, 'error', ImageExpand.error);
+ if (Conf['Restart when Opened'] && el.id !== 'ihover') {
+ ImageCommon.rewind(el);
+ }
el.removeAttribute('id');
} else {
el = file.fullImage = $.el((isVideo ? 'video' : 'img'));
@@ -12274,6 +12292,10 @@ ImageHover = (function() {
$.on(el, 'error', error);
el.src = file.url;
}
+ if (Conf['Restart when Opened']) {
+ ImageCommon.rewind(el);
+ ImageCommon.rewind(this);
+ }
el.id = 'ihover';
$.add(Header.hover, el);
if (isVideo) {
diff --git a/builds/4chan-X.crx b/builds/4chan-X.crx
index 6a5dcb517..9be75a536 100644
Binary files a/builds/4chan-X.crx and b/builds/4chan-X.crx differ
diff --git a/builds/4chan-X.meta.js b/builds/4chan-X.meta.js
index 01c0a6c6d..bb0cb3590 100644
--- a/builds/4chan-X.meta.js
+++ b/builds/4chan-X.meta.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.12.0.7
+// @version 1.12.0.8
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js
index 66fc8e175..cdac6c0a6 100644
--- a/builds/4chan-X.user.js
+++ b/builds/4chan-X.user.js
@@ -1,6 +1,6 @@
// ==UserScript==
// @name 4chan X
-// @version 1.12.0.7
+// @version 1.12.0.8
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X
@@ -136,7 +136,7 @@ docSet = function() {
};
g = {
- VERSION: '1.12.0.7',
+ VERSION: '1.12.0.8',
NAMESPACE: '4chan X.',
boards: {}
};
@@ -244,6 +244,7 @@ Config = (function() {
'Fappe Tyme': [true, 'Hide posts without images when header menu item is checked. *hint* *hint*'],
'Werk Tyme': [true, 'Hide all post images when header menu item is checked.'],
'Autoplay': [true, 'Videos begin playing immediately when opened.'],
+ 'Restart when Opened': [false, 'Restart GIFs and WebMs when you hover over or expand them.'],
'Show Controls': [true, 'Show controls on videos expanded inline.'],
'Click Passthrough': [false, 'Clicks on videos trigger your browser\'s default behavior. Videos can be contracted with button / dragging to the left.', 1],
'Allow Sound': [true, 'Open videos with the sound unmuted.'],
@@ -11685,6 +11686,17 @@ ImageCommon = (function() {
$.off(video, 'volumechange', Volume.change);
return video.muted = true;
},
+ rewind: function(el) {
+ if (el.nodeName === 'VIDEO') {
+ if (el.readyState >= el.HAVE_METADATA) {
+ return el.currentTime = 0;
+ }
+ } else if (/\.gif$/.test(el.src)) {
+ return $.queueTask(function() {
+ return el.src = el.src;
+ });
+ }
+ },
pushCache: function(el) {
ImageCommon.cache = el;
return $.on(el, 'error', ImageCommon.cacheError);
@@ -12005,6 +12017,9 @@ ImageExpand = (function() {
$.off(el, eventName, cb);
}
}
+ if (Conf['Restart when Opened']) {
+ ImageCommon.rewind(file.thumb);
+ }
delete file.fullImage;
return $.queueTask(function() {
if (file.isExpanding || file.isExpanded) {
@@ -12031,6 +12046,9 @@ ImageExpand = (function() {
} else if (((ref = ImageCommon.cache) != null ? ref.dataset.fullID : void 0) === post.fullID) {
el = file.fullImage = ImageCommon.popCache();
$.on(el, 'error', ImageExpand.error);
+ if (Conf['Restart when Opened'] && el.id !== 'ihover') {
+ ImageCommon.rewind(el);
+ }
el.removeAttribute('id');
} else {
el = file.fullImage = $.el((isVideo ? 'video' : 'img'));
@@ -12274,6 +12292,10 @@ ImageHover = (function() {
$.on(el, 'error', error);
el.src = file.url;
}
+ if (Conf['Restart when Opened']) {
+ ImageCommon.rewind(el);
+ ImageCommon.rewind(this);
+ }
el.id = 'ihover';
$.add(Header.hover, el);
if (isVideo) {
diff --git a/builds/4chan-X.zip b/builds/4chan-X.zip
index 70d0ec878..c4dd7907f 100644
Binary files a/builds/4chan-X.zip and b/builds/4chan-X.zip differ
diff --git a/builds/updates-beta.xml b/builds/updates-beta.xml
index e78aef761..db3983302 100644
--- a/builds/updates-beta.xml
+++ b/builds/updates-beta.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/builds/updates.xml b/builds/updates.xml
index 062119d17..4955590a9 100644
--- a/builds/updates.xml
+++ b/builds/updates.xml
@@ -1,7 +1,7 @@
-
+
diff --git a/version.json b/version.json
index ad75e5ded..d5ab29849 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.12.0.7",
- "date": "2016-07-06T08:35:01.248Z"
+ "version": "1.12.0.8",
+ "date": "2016-07-07T00:27:21.985Z"
}
\ No newline at end of file