Merge branch 'Beta'

This commit is contained in:
ccd0 2014-12-15 21:06:41 -08:00
commit 7f7ae9917e
19 changed files with 188 additions and 36 deletions

View File

@ -3,6 +3,15 @@ The attributions below are for work that has been incorporated into the script a
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.16.x -->
### v1.9.16.4
*2014-12-15* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.16.4/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.16.4/builds/4chan-X-noupdate.crx "Chromium version")]
Merge v1.9.15.21:
**ccd0**
- Flags on /pol/ are now country flags.
- Update `Disable Autoplaying Sounds` to stop Youtube videos and `<marquee>`.
### v1.9.16.3
*2014-12-14* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.16.3/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.16.3/builds/4chan-X-noupdate.crx "Chromium version")]
@ -30,6 +39,13 @@ Based on v1.9.15.19.
- Add option `Force Noscript Captcha` to use the non-Javascript version of Recaptcha and an interface similar to the old Recaptcha. Also use this version of the captcha if Javascript is disabled on the page (4chan X can be used this way in Greasemonkey 2.x).
<!-- v1.9.15.x -->
### v1.9.15.21
*2014-12-15* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.15.21/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.15.21/builds/4chan-X-noupdate.crx "Chromium version")]
**ccd0**
- Flags on /pol/ are now country flags.
- Update `Disable Autoplaying Sounds` to stop Youtube videos and `<marquee>`.
### v1.9.15.20
*2014-12-14* - [[Firefox](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.15.20/builds/4chan-X-noupdate.user.js "Firefox version")] [[Chromium](https://raw.githubusercontent.com/ccd0/4chan-x/1.9.15.20/builds/4chan-X-noupdate.crx "Chromium version")]

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.9.16.3
* 4chan X - Version 1.9.16.4
*
* 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.16.3
// @version 1.9.16.4
// @minGMVer 1.14
// @minFFVer 26
// @namespace 4chan-X

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

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

File diff suppressed because one or more lines are too long

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.16.3' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X-beta.crx' version='1.9.16.4' />
</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.16.3' />
<updatecheck codebase='https://ccd0.github.io/4chan-x/builds/4chan-X.crx' version='1.9.16.4' />
</app>
</gupdate>

View File

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

View File

@ -127,7 +127,7 @@ Build =
flag = unless flagCode
<%= html('') %>
else if boardID is 'pol'
else if false
<%= html('<img src="//s.4cdn.org/image/country/troll/${flagCode.toLowerCase()}.gif" alt="${flagCode}" title="${flagName}" class="countryFlag">') %>
else
<%= html('<span title="${flagName}" class="flag flag-${flagCode.toLowerCase()}"></span>') %>

View File

@ -99,7 +99,7 @@ Config =
]
'Disable Autoplaying Sounds': [
false
'Prevent sounds on the page from autoplaying.'
'Stop autoplaying sounds and other annoyances.'
]
'Linkification':

View File

@ -109,6 +109,15 @@ audio.controls-added {
display: block;
margin: auto;
}
:root.anti-autoplay div.embed {
position: static;
width: auto;
height: auto;
text-align: center;
}
:root.anti-autoplay marquee {
visibility: hidden;
}
/* fixed, z-index */
#overlay,

View File

@ -1,8 +1,16 @@
AntiAutoplay =
init: ->
return if !Conf['Disable Autoplaying Sounds']
$.addClass doc, 'anti-autoplay'
@stop audio for audio in $$ 'audio[autoplay]', doc
window.addEventListener 'loadstart', ((e) => @stop e.target), true
Post.callbacks.push
name: 'Disable Autoplaying Sounds'
cb: @node
CatalogThread.callbacks.push
name: 'Disable Autoplaying Sounds'
cb: @node
$.ready => @process d.body
stop: (audio) ->
return unless audio.autoplay
@ -11,3 +19,14 @@ AntiAutoplay =
return if audio.controls
audio.controls = true
$.addClass audio, 'controls-added'
node: ->
AntiAutoplay.process @nodes.root
process: (root) ->
for iframe in $$ 'iframe[src*="youtube"][src*="autoplay=1"]', root
iframe.src = iframe.src.replace(/\?autoplay=1&?/, '?').replace('&autoplay=1', '')
for marquee in $$ 'marquee', root
span = $.el 'span', className: 'removed-marquee'
$.replace marquee, span
$.add span, [marquee.childNodes...]

View File

@ -607,7 +607,7 @@ QR =
$.rm nodes.flag
delete nodes.flag
if g.BOARD.ID is 'pol'
if false
flag = QR.flags()
flag.dataset.name = 'flag'
flag.dataset.default = '0'