Assume Chrome is broken by default. #2378
This commit is contained in:
parent
e8c30e868f
commit
6698d7e9de
@ -167,6 +167,8 @@ Settings =
|
||||
$('div[data-name="Remember QR Size"]', section).hidden = true
|
||||
if $.perProtocolSettings or location.protocol isnt 'https:'
|
||||
$('div[data-name="Redirect to HTTPS"]', section).hidden = true
|
||||
if $.platform isnt 'crx'
|
||||
$('div[data-name="Work around CORB Bug"]', section).hidden = true
|
||||
|
||||
$.get items, (items) ->
|
||||
for key, val of items
|
||||
|
||||
@ -129,6 +129,10 @@ Config =
|
||||
true
|
||||
'Rewrite the URL of the current page, removing slugs and excess slashes, and changing /res/ to /thread/.'
|
||||
]
|
||||
'Work around CORB Bug': [
|
||||
true
|
||||
'Leave this checked until your garbage browser is fixed.'
|
||||
]
|
||||
'Disable Autoplaying Sounds': [
|
||||
false
|
||||
'Prevent sounds on the page from autoplaying.'
|
||||
@ -1163,7 +1167,6 @@ Config =
|
||||
'Max Replies': 1000
|
||||
|
||||
'Autohiding Scrollbar': false
|
||||
'Chromium CORB Bug': false
|
||||
|
||||
position:
|
||||
'embedding.position': 'top: 50px; right: 0px;'
|
||||
|
||||
@ -79,7 +79,7 @@ $.ajax = do ->
|
||||
url = url.replace /^((?:https?:)?\/\/(?:\w+\.)?(?:4chan|4channel|4cdn)\.org)\/adv\//, '$1//adv/'
|
||||
<% if (type === 'crx') { %>
|
||||
# XXX https://bugs.chromium.org/p/chromium/issues/detail?id=920638
|
||||
if Conf['Chromium CORB Bug'] and g.SITE.software is 'yotsuba' and !options.testCORB
|
||||
if Conf['Work around CORB Bug'] and g.SITE.software is 'yotsuba' and !options.testCORB
|
||||
return $.ajaxPage url, options
|
||||
<% } %>
|
||||
{onloadend, timeout, responseType, withCredentials, type, onprogress, form, headers} = options
|
||||
@ -95,8 +95,8 @@ $.ajax = do ->
|
||||
<% if (type === 'crx') { %>
|
||||
# XXX https://bugs.chromium.org/p/chromium/issues/detail?id=920638
|
||||
$.on r, 'load', ->
|
||||
if !Conf['Chromium CORB Bug'] and r.readyState is 4 and r.status is 200 and r.statusText is '' and r.response is null
|
||||
$.set 'Chromium CORB Bug', (Conf['Chromium CORB Bug'] = Date.now())
|
||||
if !Conf['Work around CORB Bug'] and r.readyState is 4 and r.status is 200 and r.statusText is '' and r.response is null
|
||||
$.set 'Work around CORB Bug', (Conf['Work around CORB Bug'] = Date.now())
|
||||
<% } %>
|
||||
r.send form
|
||||
catch err
|
||||
@ -114,14 +114,6 @@ do ->
|
||||
requests = $.dict()
|
||||
|
||||
$.ajaxPageInit = ->
|
||||
if Conf['Chromium CORB Bug'] and g.SITE.software is 'yotsuba'
|
||||
unless 0 <= Date.now() - Conf['Chromium CORB Bug'] < 2 * $.DAY
|
||||
$.ajax "#{location.protocol}//a.4cdn.org/boards.json",
|
||||
testCORB: true
|
||||
onloadend: ->
|
||||
if @response
|
||||
$.set 'Chromium CORB Bug', (Conf['Chromium CORB Bug'] = false)
|
||||
|
||||
$.global ->
|
||||
window.FCX.requests = Object.create(null)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user