Make classes consistent with Mayhem X

This commit is contained in:
seaweedchan 2013-08-14 02:41:07 -07:00
commit 6b98f8acb4
17 changed files with 46 additions and 50 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -138,7 +138,7 @@ PostHiding =
makeButton: (post, type) -> makeButton: (post, type) ->
a = $.el 'a', a = $.el 'a',
className: "#{type}-reply-button" className: "#{type}-reply-button"
innerHTML: "<span class=fourchanx-link>&nbsp;#{if type is 'hide' then '-' else '+'}&nbsp;</span>" innerHTML: "<span class=brackets-wrap>&nbsp;#{if type is 'hide' then '-' else '+'}&nbsp;</span>"
href: 'javascript:;' href: 'javascript:;'
$.on a, 'click', PostHiding.toggle $.on a, 'click', PostHiding.toggle
a a

View File

@ -134,7 +134,7 @@ ThreadHiding =
makeButton: (thread, type) -> makeButton: (thread, type) ->
a = $.el 'a', a = $.el 'a',
className: "#{type}-thread-button" className: "#{type}-thread-button"
innerHTML: "<span class=fourchanx-link>&nbsp;#{if type is 'hide' then '-' else '+'}&nbsp;</span>" innerHTML: "<span class=brackets-wrap>&nbsp;#{if type is 'hide' then '-' else '+'}&nbsp;</span>"
href: 'javascript:;' href: 'javascript:;'
a.dataset.fullID = thread.fullID a.dataset.fullID = thread.fullID
$.on a, 'click', ThreadHiding.toggle $.on a, 'click', ThreadHiding.toggle

View File

@ -111,7 +111,7 @@ Header =
a.className = 'current' a.className = 'current'
boardList = $.el 'span', boardList = $.el 'span',
id: 'board-list' id: 'board-list'
innerHTML: "<span id=custom-board-list></span><span id=full-board-list hidden><span class='hide-board-list-container fourchanx-link'><a href=javascript:; class='hide-board-list-button'>&nbsp;-&nbsp;</a></span> #{fourchannav.innerHTML}</span>" innerHTML: "<span id=custom-board-list></span><span id=full-board-list hidden><span class='hide-board-list-container brackets-wrap'><a href=javascript:; class='hide-board-list-button'>&nbsp;-&nbsp;</a></span> #{fourchannav.innerHTML}</span>"
fullBoardList = $ '#full-board-list', boardList fullBoardList = $ '#full-board-list', boardList
btn = $ '.hide-board-list-button', fullBoardList btn = $ '.hide-board-list-button', fullBoardList
$.on btn, 'click', Header.toggleBoardList $.on btn, 'click', Header.toggleBoardList
@ -309,7 +309,7 @@ Header =
addShortcut: (el) -> addShortcut: (el) ->
shortcut = $.el 'span', shortcut = $.el 'span',
className: 'shortcut fourchanx-link' className: 'shortcut brackets-wrap'
$.add shortcut, el $.add shortcut, el
$.prepend Header.shortcuts, shortcut $.prepend Header.shortcuts, shortcut

View File

@ -52,7 +52,7 @@
} }
/* Watcher Favicon */ /* Watcher Favicon */
:root.burichan .watch-thread-link :root.burichan .watcher-toggler
{ {
background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(0,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>"); background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(0,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>");
} }

View File

@ -52,7 +52,7 @@
} }
/* Watcher Favicon */ /* Watcher Favicon */
:root.futaba .watch-thread-link :root.futaba .watcher-toggler
{ {
background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(128,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>"); background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(128,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>");
} }

View File

@ -52,7 +52,7 @@
} }
/* Watcher Favicon */ /* Watcher Favicon */
:root.photon .watch-thread-link :root.photon .watcher-toggler
{ {
background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(51,51,51)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>"); background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(51,51,51)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>");
} }

View File

@ -39,7 +39,7 @@
overflow: hidden; overflow: hidden;
} }
label, label,
.watch-thread-link { .watcher-toggler {
cursor: pointer; cursor: pointer;
} }
a[href="javascript:;"] { a[href="javascript:;"] {
@ -227,10 +227,10 @@ a {
font-weight: bold; font-weight: bold;
} }
/* 4chan X link brackets */ /* 4chan X link brackets */
.fourchanx-link::after { .brackets-wrap::after {
content: "]"; content: "]";
} }
.fourchanx-link::before { .brackets-wrap::before {
content: "["; content: "[";
} }
/* Notifications */ /* Notifications */
@ -472,16 +472,12 @@ a.hide-announcement {
} }
#thread-watcher { #thread-watcher {
padding-bottom: 3px; padding-bottom: 3px;
padding-left: 3px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
min-width: 136px; min-width: 120px;
max-height: 92%; max-height: 92%;
overflow-y: auto; overflow-y: auto;
} }
#thread-watcher .menu-button {
bottom: 1px;
}
:root.fixed-watcher #thread-watcher { :root.fixed-watcher #thread-watcher {
position: fixed; position: fixed;
} }
@ -492,7 +488,7 @@ a.hide-announcement {
#thread-watcher > .move { #thread-watcher > .move {
padding-top: 3px; padding-top: 3px;
} }
#watched-threads > div { #thread-watcher > div {
max-width: 250px; max-width: 250px;
overflow: hidden; overflow: hidden;
padding-left: 3px; padding-left: 3px;
@ -508,7 +504,7 @@ a.hide-announcement {
top: 0px; top: 0px;
padding: 0px 4px; padding: 0px 4px;
} }
.watch-thread-link { .watcher-toggler {
padding-top: 18px; padding-top: 18px;
width: 18px; width: 18px;
height: 0px; height: 0px;
@ -518,7 +514,7 @@ a.hide-announcement {
position: relative; position: relative;
top: 1px; top: 1px;
} }
.watch-thread-link.watched { .watcher-toggler.watched {
opacity: 1; opacity: 1;
} }

View File

@ -58,7 +58,7 @@
} }
/* Watcher Favicon */ /* Watcher Favicon */
:root.tomorrow .watch-thread-link :root.tomorrow .watcher-toggler
{ {
background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(197,200,198)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>"); background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(197,200,198)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>");
} }

View File

@ -52,7 +52,7 @@
} }
/* Watcher Favicon */ /* Watcher Favicon */
:root.yotsuba-b .watch-thread-link :root.yotsuba-b .watcher-toggler
{ {
background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(0,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>"); background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(0,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>");
} }

View File

@ -52,7 +52,7 @@
} }
/* Watcher Favicon */ /* Watcher Favicon */
:root.yotsuba .watch-thread-link :root.yotsuba .watcher-toggler
{ {
background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(128,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>"); background-image: url("data:image/svg+xml,<svg viewBox='0 0 26 26' preserveAspectRatio='true' xmlns='http://www.w3.org/2000/svg'><path fill='rgb(128,0,0)' d='M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z'/></svg>");
} }

View File

@ -1,2 +1,2 @@
<div class="move">Thread Watcher <span id="watcher-status"></span><a class="menu-button fourchanx-link" href="javascript:;"><i></i></a><a class=close href=javascript:;>×</a></span></div> <div class="move">Thread Watcher <span id="watcher-status"></span><a class="menu-button brackets-wrap" href="javascript:;"><i></i></a><a class=close href=javascript:;>×</a></span></div>
<div id="watched-threads"></div> <div id="watched-threads"></div>

View File

@ -5,7 +5,7 @@ Linkify =
@regString = @regString =
///( ///(
# http, magnet, ftp, etc # http, magnet, ftp, etc
?:(http|https|mailto|git|magnet|ftp|irc):( (https?|mailto|git|magnet|ftp|irc):(
[a-z\d%/] [a-z\d%/]
) )
| |
@ -80,7 +80,7 @@ Linkify =
else else
if link = Linkify.regString.exec result[0] if link = Linkify.regString.exec result[0]
range = Linkify.makeRange node, node, index + link.index, length + link.index range = Linkify.makeRange node, node, index + link.index, length
links.push range links.push range
for range in links.reverse() for range in links.reverse()

View File

@ -1,6 +1,6 @@
Menu = do -> Menu = do ->
a = $.el 'a', a = $.el 'a',
className: 'menu-button fourchanx-link' className: 'menu-button brackets-wrap'
innerHTML: '<i></i>' innerHTML: '<i></i>'
href: 'javascript:;' href: 'javascript:;'

View File

@ -24,7 +24,7 @@ PSAHiding =
$.on entry.el, 'click', PSAHiding.toggle $.on entry.el, 'click', PSAHiding.toggle
PSAHiding.btn = btn = $.el 'a', PSAHiding.btn = btn = $.el 'a',
innerHTML: '<span class=fourchanx-link>&nbsp;-&nbsp;</span>' innerHTML: '<span class=brackets-wrap>&nbsp;-&nbsp;</span>'
title: 'Hide announcement.' title: 'Hide announcement.'
className: 'hide-announcement' className: 'hide-announcement'
href: 'javascript:;' href: 'javascript:;'

View File

@ -45,7 +45,7 @@ ThreadWatcher =
node: -> node: ->
toggler = $.el 'img', toggler = $.el 'img',
className: 'watch-thread-link' className: 'watcher-toggler'
$.on toggler, 'click', ThreadWatcher.cb.toggle $.on toggler, 'click', ThreadWatcher.cb.toggle
$.before $('input', @OP.nodes.post), toggler $.before $('input', @OP.nodes.post), toggler
@ -174,7 +174,7 @@ ThreadWatcher =
$.add list, nodes $.add list, nodes
for threadID, thread of g.BOARD.threads for threadID, thread of g.BOARD.threads
toggler = $ '.watch-thread-link', thread.OP.nodes.post toggler = $ '.watcher-toggler', thread.OP.nodes.post
watched = ThreadWatcher.db.get {boardID: thread.board.ID, threadID} watched = ThreadWatcher.db.get {boardID: thread.board.ID, threadID}
$[if watched then 'addClass' else 'rmClass'] toggler, 'watched' $[if watched then 'addClass' else 'rmClass'] toggler, 'watched'