Add warning about not blocking ads.

This commit is contained in:
ccd0 2015-12-03 22:11:52 -08:00
parent 4dfa4d6a19
commit 1dfbd0609b
2 changed files with 17 additions and 8 deletions

View File

@ -97,19 +97,28 @@ Settings =
$.event 'OpenSettings', null, section $.event 'OpenSettings', null, section
main: (section) -> main: (section) ->
warnings = [] warnings = $.el 'fieldset',
hidden: true
,
<%= html('<legend>Warnings</legend><ul></ul>') %>
addWarning = (item) ->
$.add $('ul', warnings), item
warnings.hidden = false
$.add section, warnings
if $.cantSync if $.cantSync
why = if $.cantSet then 'save your settings' else 'synchronize settings between tabs' why = if $.cantSet then 'save your settings' else 'synchronize settings between tabs'
warnings.push $.el 'li', addWarning $.el 'li',
textContent: """ textContent: """
<%= meta.name %> needs local storage to #{why}. <%= meta.name %> needs local storage to #{why}.
Enable it on boards.4chan.org in your browser's privacy settings (may be listed as part of "local data" or "cookies"). Enable it on boards.4chan.org in your browser's privacy settings (may be listed as part of "local data" or "cookies").
""" """
if warnings.length $.onExists d.body, '.ad-cnt', true, (ad) -> $.onExists ad, 'img', true, ->
fs = $.el 'fieldset', addWarning $.el 'li',
<%= html('<legend>Warnings</legend><ul></ul>') %> <%= html(
$.add $('ul', fs), warnings 'For <a href="//boards.4chan.org/qa/thread/362590" target="_blank">security reasons</a>' +
$.add section, fs ' you should <a href="https://github.com/gorhill/uBlock" target="_blank">block ads</a> on 4chan.'
) %>
items = {} items = {}
inputs = {} inputs = {}

View File

@ -563,7 +563,7 @@ div[data-checked="false"] > .suboption-list {
.section-filter textarea { .section-filter textarea {
height: 500px; height: 500px;
} }
.section-filter a, .section-advanced a { .section-main a, .section-filter a, .section-advanced a {
text-decoration: underline; text-decoration: underline;
} }
.section-sauce textarea { .section-sauce textarea {