Fix style issues in #160

This commit is contained in:
Zixaphir 2013-04-19 14:40:05 -07:00
parent d252916621
commit 1484cd5609
7 changed files with 53 additions and 17 deletions

View File

@ -42,7 +42,7 @@
*/
(function() {
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, Icons, ImageExpand, ImageHover, ImageReplace, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, Icons, ImageExpand, ImageHover, ImageReplace, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, MutationObserver, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
__slice = [].slice,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
@ -332,6 +332,8 @@
posts: {}
};
MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.OMutationObserver;
Mascots = {
'Akiyama_Mio': {
category: 'Anime',
@ -9617,7 +9619,7 @@
}), this.ready.bind(this));
},
ready: function() {
var MutationObserver, imgContainer, input, observer, setLifetime,
var imgContainer, input, observer, setLifetime,
_this = this;
setLifetime = function(e) {
@ -9643,7 +9645,7 @@
img: imgContainer.firstChild,
input: input
};
if (MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.OMutationObserver) {
if (MutationObserver) {
observer = new MutationObserver(this.load.bind(this));
observer.observe(this.nodes.challenge, {
childList: true
@ -10524,15 +10526,22 @@
return this.cb = QuoteThreading.nodeinsert;
},
nodeinsert: function() {
var posts, qpost, qroot, threadContainer;
var bottom, height, posts, qpost, qroot, threadContainer, top, _ref;
posts = g.posts;
qpost = posts[this.threaded];
delete this.threaded;
delete this.cb;
if (this.thread.OP === qpost || (QuoteThreading.hasRun && !Unread.posts.contains(qpost))) {
if (this.thread.OP === qpost) {
return false;
}
if (QuoteThreading.hasRun) {
height = doc.clientHeight;
_ref = qpost.nodes.root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top;
if (!(Unread.posts.contains(qpost) || ((bottom < height) && (top > 0)))) {
return false;
}
}
qroot = qpost.nodes.root;
threadContainer = qroot.nextSibling;
if ((threadContainer != null ? threadContainer.className : void 0) !== 'threadContainer') {

View File

@ -42,7 +42,7 @@
*/
(function() {
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, Icons, ImageExpand, ImageHover, ImageReplace, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, Icons, ImageExpand, ImageHover, ImageReplace, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, MutationObserver, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
__slice = [].slice,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
@ -329,6 +329,8 @@
posts: {}
};
MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.OMutationObserver;
Mascots = {
'Akiyama_Mio': {
category: 'Anime',
@ -9615,7 +9617,7 @@
}), this.ready.bind(this));
},
ready: function() {
var MutationObserver, imgContainer, input, observer, setLifetime,
var imgContainer, input, observer, setLifetime,
_this = this;
setLifetime = function(e) {
@ -9641,7 +9643,7 @@
img: imgContainer.firstChild,
input: input
};
if (MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.OMutationObserver) {
if (MutationObserver) {
observer = new MutationObserver(this.load.bind(this));
observer.observe(this.nodes.challenge, {
childList: true
@ -10541,15 +10543,22 @@
return this.cb = QuoteThreading.nodeinsert;
},
nodeinsert: function() {
var posts, qpost, qroot, threadContainer;
var bottom, height, posts, qpost, qroot, threadContainer, top, _ref;
posts = g.posts;
qpost = posts[this.threaded];
delete this.threaded;
delete this.cb;
if (this.thread.OP === qpost || (QuoteThreading.hasRun && !Unread.posts.contains(qpost))) {
if (this.thread.OP === qpost) {
return false;
}
if (QuoteThreading.hasRun) {
height = doc.clientHeight;
_ref = qpost.nodes.root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top;
if (!(Unread.posts.contains(qpost) || ((bottom < height) && (top > 0)))) {
return false;
}
}
qroot = qpost.nodes.root;
threadContainer = qroot.nextSibling;
if ((threadContainer != null ? threadContainer.className : void 0) !== 'threadContainer') {

Binary file not shown.

View File

@ -1,5 +1,5 @@
(function() {
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, Icons, ImageExpand, ImageHover, ImageReplace, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
var $, $$, Anonymize, ArchiveLink, Banner, Board, Build, CatalogLinks, Clone, Conf, Config, CustomCSS, DataBoard, DataBoards, DeleteLink, DownloadLink, Emoji, ExpandComment, ExpandThread, FappeTyme, Favicon, FileInfo, Filter, Fourchan, Get, GlobalMessage, Header, Icons, ImageExpand, ImageHover, ImageReplace, JSColor, Keybinds, Linkify, Main, MascotTools, Mascots, Menu, MutationObserver, Nav, Notification, PSAHiding, Polyfill, Post, PostHiding, QR, QuoteBacklink, QuoteCT, QuoteInline, QuoteOP, QuotePreview, QuoteStrikeThrough, QuoteThreading, QuoteYou, Quotify, Recursive, Redirect, RelativeDates, Report, ReportLink, RevealSpoilers, Rice, Sauce, Settings, Style, ThemeTools, Themes, Thread, ThreadExcerpt, ThreadHiding, ThreadStats, ThreadUpdater, ThreadWatcher, Time, UI, Unread, c, d, doc, editMascot, editTheme, g, userNavigation,
__slice = [].slice,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
@ -285,6 +285,8 @@
posts: {}
};
MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.OMutationObserver;
Mascots = {
'Akiyama_Mio': {
category: 'Anime',
@ -9537,7 +9539,7 @@
}), this.ready.bind(this));
},
ready: function() {
var MutationObserver, imgContainer, input, observer, setLifetime,
var imgContainer, input, observer, setLifetime,
_this = this;
setLifetime = function(e) {
@ -9563,7 +9565,7 @@
img: imgContainer.firstChild,
input: input
};
if (MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.OMutationObserver) {
if (MutationObserver) {
observer = new MutationObserver(this.load.bind(this));
observer.observe(this.nodes.challenge, {
childList: true
@ -10444,15 +10446,22 @@
return this.cb = QuoteThreading.nodeinsert;
},
nodeinsert: function() {
var posts, qpost, qroot, threadContainer;
var bottom, height, posts, qpost, qroot, threadContainer, top, _ref;
posts = g.posts;
qpost = posts[this.threaded];
delete this.threaded;
delete this.cb;
if (this.thread.OP === qpost || (QuoteThreading.hasRun && !Unread.posts.contains(qpost))) {
if (this.thread.OP === qpost) {
return false;
}
if (QuoteThreading.hasRun) {
height = doc.clientHeight;
_ref = qpost.nodes.root.getBoundingClientRect(), bottom = _ref.bottom, top = _ref.top;
if (!(Unread.posts.contains(qpost) || ((bottom < height) && (top > 0)))) {
return false;
}
}
qroot = qpost.nodes.root;
threadContainer = qroot.nextSibling;
if ((threadContainer != null ? threadContainer.className : void 0) !== 'threadContainer') {

View File

@ -19,6 +19,8 @@ g =
threads: {}
posts: {}
MutationObserver = window.MutationObserver or window.WebKitMutationObserver or window.OMutationObserver
Mascots =
'Akiyama_Mio':
category: 'Anime'

View File

@ -671,7 +671,7 @@ QR =
img: imgContainer.firstChild
input: input
if MutationObserver = window.MutationObserver or window.WebKitMutationObserver or window.OMutationObserver
if MutationObserver
observer = new MutationObserver @load.bind @
observer.observe @nodes.challenge,
childList: true

View File

@ -62,7 +62,14 @@ QuoteThreading =
delete @threaded
delete @cb
return false if @thread.OP is qpost or (QuoteThreading.hasRun and !Unread.posts.contains qpost)
return false if @thread.OP is qpost
if QuoteThreading.hasRun
height = doc.clientHeight
{bottom, top} = qpost.nodes.root.getBoundingClientRect()
# Post is unread or is fully visible.
return false unless Unread.posts.contains(qpost) or ((bottom < height) and (top > 0))
qroot = qpost.nodes.root
threadContainer = qroot.nextSibling