Style fixes for the catalog.
4chan's integration of the catalog is terrible. I don't see myself supporting it any further.
This commit is contained in:
parent
a9b427f0d2
commit
4e976a5594
@ -922,7 +922,7 @@
|
|||||||
boardTitle = $.el('a', {
|
boardTitle = $.el('a', {
|
||||||
className: 'board-name',
|
className: 'board-name',
|
||||||
innerHTML: "<span class=board-path>/" + g.BOARD + "/</span> - <span class=board-title>...</span>",
|
innerHTML: "<span class=board-path>/" + g.BOARD + "/</span> - <span class=board-title>...</span>",
|
||||||
href: "/" + g.BOARD + "/"
|
href: "/" + g.BOARD + "/" + (g.VIEW === 'catalog' ? 'catalog' : '')
|
||||||
});
|
});
|
||||||
boardList = $.el('span', {
|
boardList = $.el('span', {
|
||||||
className: 'board-list',
|
className: 'board-list',
|
||||||
@ -946,7 +946,7 @@
|
|||||||
setBoardList: function() {
|
setBoardList: function() {
|
||||||
var a, nav;
|
var a, nav;
|
||||||
if (nav = $.id('boardNavDesktop')) {
|
if (nav = $.id('boardNavDesktop')) {
|
||||||
if (a = $("a[href$='/" + g.BOARD + "/']", nav)) {
|
if (a = $("a[href*='/" + g.BOARD + "/']", nav)) {
|
||||||
a.className = 'current';
|
a.className = 'current';
|
||||||
$('.board-title', Header.headerEl).textContent = a.title;
|
$('.board-title', Header.headerEl).textContent = a.title;
|
||||||
}
|
}
|
||||||
@ -2449,7 +2449,7 @@
|
|||||||
return this.input.alt = count;
|
return this.input.alt = count;
|
||||||
},
|
},
|
||||||
reload: function(focus) {
|
reload: function(focus) {
|
||||||
$.unsafeWindow.Recaptcha.reload('r');
|
$.unsafeWindow.Recaptcha.reload('t');
|
||||||
if (focus) {
|
if (focus) {
|
||||||
return QR.captcha.input.focus();
|
return QR.captcha.input.focus();
|
||||||
}
|
}
|
||||||
@ -5119,6 +5119,10 @@
|
|||||||
$.addClass(doc, $.engine);
|
$.addClass(doc, $.engine);
|
||||||
$.addClass(doc, 'fourchan-x');
|
$.addClass(doc, 'fourchan-x');
|
||||||
$.addStyle(Main.css);
|
$.addStyle(Main.css);
|
||||||
|
if (g.VIEW === 'catalog') {
|
||||||
|
$.addClass(doc, $.id('base-css').href.match(/catalog_(\w+)/)[1].replace('_new', '').replace(/_+/g, '-'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
style = 'yotsuba-b';
|
style = 'yotsuba-b';
|
||||||
mainStyleSheet = $('link[title=switch]', d.head);
|
mainStyleSheet = $('link[title=switch]', d.head);
|
||||||
styleSheets = $$('link[rel="alternate stylesheet"]', d.head);
|
styleSheets = $$('link[rel="alternate stylesheet"]', d.head);
|
||||||
|
|||||||
@ -25,7 +25,7 @@ Header =
|
|||||||
boardTitle = $.el 'a',
|
boardTitle = $.el 'a',
|
||||||
className: 'board-name'
|
className: 'board-name'
|
||||||
innerHTML: "<span class=board-path>/#{g.BOARD}/</span> - <span class=board-title>...</span>"
|
innerHTML: "<span class=board-path>/#{g.BOARD}/</span> - <span class=board-title>...</span>"
|
||||||
href: "/#{g.BOARD}/"
|
href: "/#{g.BOARD}/#{if g.VIEW is 'catalog' then 'catalog' else ''}"
|
||||||
boardList = $.el 'span',
|
boardList = $.el 'span',
|
||||||
className: 'board-list'
|
className: 'board-list'
|
||||||
hidden: true
|
hidden: true
|
||||||
@ -43,7 +43,7 @@ Header =
|
|||||||
|
|
||||||
setBoardList: ->
|
setBoardList: ->
|
||||||
if nav = $.id 'boardNavDesktop'
|
if nav = $.id 'boardNavDesktop'
|
||||||
if a = $ "a[href$='/#{g.BOARD}/']", nav
|
if a = $ "a[href*='/#{g.BOARD}/']", nav
|
||||||
a.className = 'current'
|
a.className = 'current'
|
||||||
$('.board-title', Header.headerEl).textContent = a.title
|
$('.board-title', Header.headerEl).textContent = a.title
|
||||||
$.add $('.board-list', Header.headerEl),
|
$.add $('.board-list', Header.headerEl),
|
||||||
@ -1263,7 +1263,7 @@ QR =
|
|||||||
@input.alt = count # For XTRM RICE.
|
@input.alt = count # For XTRM RICE.
|
||||||
reload: (focus) ->
|
reload: (focus) ->
|
||||||
# the 't' argument prevents the input from being focused
|
# the 't' argument prevents the input from being focused
|
||||||
$.unsafeWindow.Recaptcha.reload 'r'
|
$.unsafeWindow.Recaptcha.reload 't'
|
||||||
# Focus if we meant to.
|
# Focus if we meant to.
|
||||||
QR.captcha.input.focus() if focus
|
QR.captcha.input.focus() if focus
|
||||||
keydown: (e) ->
|
keydown: (e) ->
|
||||||
|
|||||||
@ -332,6 +332,10 @@ Main =
|
|||||||
$.addClass doc, 'fourchan-x'
|
$.addClass doc, 'fourchan-x'
|
||||||
$.addStyle Main.css
|
$.addStyle Main.css
|
||||||
|
|
||||||
|
if g.VIEW is 'catalog'
|
||||||
|
$.addClass doc, $.id('base-css').href.match(/catalog_(\w+)/)[1].replace('_new', '').replace /_+/g, '-'
|
||||||
|
return
|
||||||
|
|
||||||
style = 'yotsuba-b'
|
style = 'yotsuba-b'
|
||||||
mainStyleSheet = $ 'link[title=switch]', d.head
|
mainStyleSheet = $ 'link[title=switch]', d.head
|
||||||
styleSheets = $$ 'link[rel="alternate stylesheet"]', d.head
|
styleSheets = $$ 'link[rel="alternate stylesheet"]', d.head
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user